Map is not initialized, with Rviz and Gazebo simulation, ROS2

asked 2019-10-10 05:58:44 -0500

ninamwa gravatar image

Hi. I have been following the Turtlebot3 tutorial with ROS2 Dashing ( which works fine for all the steps. Now, i want to try out simulation in gazebo and navigation2 with a simple robot i have built on my own. As a starter i have been using the turtlebot files, the only thing i have changed is the design of the robot (inside the model and urdf files). The sensors etc. is kept the same. I also use the map and world for turtlebot3. I want to perform the simulation part in the tutorial. First I run the command:

 ros2 launch turtlebot3_gazebo

which correctly visualize the robot and world in Gazebo. Then I run

ros2 launch turtlebot3_navigation2 use_sim_time:=True map:=$HOME/map.yaml

RviZ opens with the correct map, but a lot of errors occur both in Rviz and in the terminalwindow:

When I used the turtlebot model, this errors also occurred, but they where removed when I set the initial pose for the robot. Now, when I try to set the initial pose, the command line tells that amcl has received an initial pose and set it:

But the errors in rviz are still there and the command window keeps printing the same errors as before.

The error in Rviz are Global Status: Error, Fixed Frame:Frame [map] does not exist.

I assume it is the transform between the map and gazebo/odom(?) which is missing, but I tought it would be fine when I set the initial pose for the robot. Does anyone have any suggestions to what could be the problem?

edit retag flag offensive close merge delete