Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Based on various Husarion's GitHub reposistories. Bugfixes and fixes mainly to run it without Docker. E.g.

PC

Everything presented here is mean to be run on the PC. Though navigation may work better if it would run directly on the robot due to network issues.

Install

git clone -b jazzy https://github.com/micmzr/MecHaRo-Lab_ROSBot2Pro.git
cd MecHaRo-Lab_ROSBot2Pro/ws_ros2_husarion
rosdep install --ignore-src --from-path src/ -y --rosdistro $ROS_DISTRO
colcon build
source install/setup.bash

Simulation

Generally each command should be run in separate terminal tab. Please remember to run source command.

RViz

ros2 run rviz2 rviz2 -d ./src/rosbot_ros/rosbot_description/settings/rosbot2-nav2-demo.rviz

Webots

ros2 launch webots_ros2_husarion rosbot_launch.py

To create map:

Mapping

ros2 launch slam_toolbox online_sync_launch.py slam_params_file:=./src/rosbot_ros/rosbot_description/settings/slam_toolbox_webots.yaml use_sim_time:='True'

Keyboard control

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -p use_sim_time:=True --ros-args -p stamped:=true --ros-args --remap cmd_vel:=/cmd_vel

Map saver

while true; do ros2 run nav2_map_server map_saver_cli --free 0.15 --fmt png -f ./maps/map; sleep 5; done

To run navigation:

Localization

ros2 launch nav2_bringup localization_launch.py params_file:=./src/rosbot_ros/rosbot_description/settings/amcl_params.yaml map:=./maps/map.yaml use_sim_time:='True'

Navigation

ros2 launch nav2_bringup navigation_launch.py params_file:=./src/rosbot_ros/rosbot_description/settings/nav2_params.yaml use_sim_time:='True'

Real robot

The robot should be switched on and all ROS2 nodes should run on it correctly.

RViz

ros2 run rviz2 rviz2 -d ./src/rosbot_ros/rosbot_description/settings/rosbot2-nav2-demo.rviz

To create map:

Mapping

ros2 launch slam_toolbox online_sync_launch.py slam_params_file:=./src/rosbot_ros/rosbot_description/settings/slam_toolbox.yaml use_sim_time:='False' 

Keyboard controll

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -p use_sim_time:=True --ros-args -p stamped:=true --ros-args --remap cmd_vel:=/cmd_vel

Map saver

while true; do ros2 run nav2_map_server map_saver_cli --free 0.15 --fmt png -f ./maps/map; sleep 5; done

To run navigation:

Localization

ros2 launch nav2_bringup localization_launch.py params_file:=./src/rosbot_ros/rosbot_description/settings/amcl_params.yaml map:=./maps/map.yaml use_sim_time:='False'

Navigation

ros2 launch nav2_bringup navigation_launch.py params_file:=./src/rosbot_ros/rosbot_description/settings/nav2_params.yaml use_sim_time:='False'

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages