Skip to content

Navigation stack

RValner edited this page Apr 13, 2017 · 8 revisions

Table of Contents

Info

TESTED ON ROS: Indigo

TESTED ON HARDWARE: Youbot

LIST OF PACKAGES:





Preparations

In any case, the following conditions must be satisfied in order to SLAM and navigate:

  1. LIDAR or whatever device must be actively publishing LaserScan (or pointcloud) messages
  2. Robot State Publisher must be running and most importantly, there must be a TF of base_link
  3. Robot has to subscribe to Twist messages under the name of /cmd_vel and has to publish /odom (youbot ROS driver has it covered)
1) Run LIDAR (preferably on Youbot) See Hokuyo LIDAR tutorial
 $ 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.


Mapping

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


SLAM

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


Navigation without a map

Remarks

  • After youbot finishes executing the trajectory, it starts and keeps spinning very slowly in place

Navigation with a map

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

Remarks

  • Default local planner configurations in youbot_navigation leads youbot to generate very rough and creepy (very uncomfortable to be around) trajectories

Youbot navigation simulation

Described in the readme of this package: https://github.com/ut-ims-robotics/youbot/tree/sandbox/youbot_simpack