Problems using navigation on gazebo environment

I’m trying to make the robot navigate itself in a gazebo simulation environment. After I run the mapping file in the stretch_navigation folder, I cannot make the robot navigate itself using the navigation file in the same folder. Does navigation work in the simulation environment? If yes, is there a way to solve the problem?

Hello @Serendipity, welcome to the forum! The mapping and navigation launch files in Stretch Navigation are meant to be used with the real robot. If you would like to test Stretch Navigation in simulation, I’ve created mapping_gazebo.launch and navigation_gazebo.launch. This code is available for ROS Melodic on the master branch and for Noetic on the dev/noetic branch. To use it, you can run:

roscd stretch_navigation
git checkout master # or dev/noetic
git pull

Usage of these launch files is similar to the previous two, so you can use the README for instructions and substitute as necessary. One difference is that the gazebo versions of these launch files have ROS args to select the simulated Gazebo World. For example, you can map the Willow Garage world using:

roslaunch stretch_navigation mapping_gazebo.launch gazebo_visualize_lidar:=true gazebo_world:=worlds/willowgarage.world

Similarly, you can use navigation_gazebo.launch to do navigation with Stretch in Gazebo. Let me know if you have any questions.


Update 9/24/2021: The launch files were merged in different branches, so I’ve updated the install instructions here.

2 Likes