Navigation stack
TESTED ON ROS: Indigo
TESTED ON HARDWARE: Youbot
LIST OF PACKAGES:
- Navigation stack (Branch: indigo-devel): https://github.com/ros-planning/navigation/tree/indigo-devel
- Navigation stack config package for youbot: https://github.com/youbot/youbot_navigation
- Slam package: https://github.com/ros-perception/slam_gmapping
In any case, the following conditions must be satisfied in order to SLAM and navigate:
- LIDAR or whatever device must be actively publishing LaserScan (or pointcloud) messages
- Robot State Publisher must be running and most importantly, there must be a TF of base_link
- Robot has to subscribe to Twist messages under the name of /cmd_vel and has to publish /odom (youbot ROS driver has it covered)
$ roslaunch youbot_navigation_common base_front_hokuyo_node.launch
2) Run youbot driver
$ roslaunch youbot_driver_ros_interface youbot_driver.launch - Make sure, that Robot State Publisher is started. When running in parallel with moveit, moveit might have its own robot state publisher running.
1) Run a keyboard teleoperator (or whatever thing that moves youbot)
$ rosrun youbot_driver_ros_interface youbot_keyboard_teleop.py
2) Run a mapping node (LIDAR data is expected on /base_scan topic)
$ rosrun gmapping slam_gmapping scan:=base_scan
3) Make your life easier and visualize the data
$ rosrun rviz rviz - Fixed frame: odom - add LaserScan display - add RobotModel display
4) Teleoperate the robot and when finished, run a map_saver node
$ rosrun map_server map_saver -f nameOfTheMap
1) Run a keyboard teleoperator (or whatever thing that moves/navigates youbot)
$ rosrun youbot_driver_ros_interface youbot_keyboard_teleop.py
2) Run SLAM
$ roslaunch youbot_navigation_global 2dslam.launch
3) Operate the robot and when finished, run a map_saver node
$ rosrun map_server map_saver -f nameOfTheMap
- After youbot finishes executing the trajectory, it starts and keeps spinning very slowly in place
1) Run localization node and map_server
$ roslaunch youbot_navigation_global amcl.launch - make sure that the map_server is not commented out from the launch file and of course, choose the correct map
2) Run global navigation node
$ roslaunch youbot_navigation_global move_base_global.launch
3) Make your life easier and visualize the data
$ rosrun rviz rviz - Fixed frame: map - add LaserScan display - add RobotModel display - add Map display - add Local Costmap display
- Default local planner configurations in youbot_navigation leads youbot to generate very rough and creepy (very uncomfortable to be around) trajectories
Described in the readme of this package: https://github.com/ut-ims-robotics/youbot/tree/sandbox/youbot_simpack