The problem that Gazebo cannot be started when using nav2_bringup tb3_simulation_launch.py

The problem that Gazebo cannot be started when using nav2_bringup tb3_simulation_launch.py

The normal flow is:

1. Start a terminal

2. Set the key environment variable

source /opt/ros/humble/setup.bash
export TURTLEBOT3_MODEL=waffle
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/humble/share/turtlebot3_gazebo/models

3. Run in the same terminal:

ros2 launch nav2_bringup tb3_simulation_launch.py

So I don’t know why I can only open Rviz but not Gazebo. I saw on the official website that when headless:=False is added, the model that can be opened in Gazebo but there is no Turtlebo3 model. Some articles write that it is a map problem, but I can’t change it
. success

Later tried a method:

Open a new terminal and run

export TURTLEBOT3_MODEL=waffle
ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py

Run this launch file alone, you can open Gazebo, and you can connect to Rviz...

insert image description here

If anyone else knows how to fix this please let me know! thank you so much~

Guess you like

Origin blog.csdn.net/PolypolyA/article/details/125542566