Can not start simulation in PART 1 project

Hello, I have started this course (ROS2 Basics in 5 days (C++) ) and I am about to start the first part of the wall following project.
I am trying to launch the simulation as the nootbok explain:

source ~/simulation_ws/install/setup.bash
ros2 launch turtlebot3_gazebo main_turtlebot3_lab.launch.xml

When I launch the source I get the following error:

user:~$ source ~/simulation_ws/install/setup.bash
not found: "/home/user/ros2_ws/install/turtlebot3_node/share/turtlebot3_node/local_setup.bash"

Since I can not source that when I launch Gazebo I see the enviroment, but the turtlebot is light grey because the simulation can not find the robot parts. This is the terminal output:

user:~$ ros2 launch turtlebot3_gazebo main_turtlebot3_lab.launch.xml
[INFO] [launch]: All log files can be found below /home/user/.ros/log/2023-06-14-14-54-42-416578-2_xterm-8317
[INFO] [launch]: Default logging verbosity is set to INFO
GAZEBO MODELS PATH==/usr/share/gazebo-11/models:/usr/share/gazebo-11/models:/usr/share/gazebo-9/models:/usr/share/gazebo/models_robox:/home/user/simulation_ws/install/turtlebot3_description/share:/home/user/simulation_ws/install/turtlebot3_gazebo/share/turtlebot3_gazebo/models:/home/user/simulation_ws/install/turtlebot3_gazebo/share/turtlebot3_gazebo/maps/starbots_complete/models
GAZEBO PLUGINS PATH==/usr/lib/x86_64-linux-gnu/gazebo-11/plugins:/usr/lib/x86_64-linux-gnu/gazebo-11/plugins::/home/user/simulation_ws/install/turtlebot3_description/lib:/opt/ros/foxy/lib
urdf_file_name : turtlebot3_burger.urdf
[INFO] [gzserver-1]: process started with pid [8338]
[INFO] [gzclient --verbose  -2]: process started with pid [8340]
[INFO] [robot_state_publisher-3]: process started with pid [8342]
[INFO] [spawn_entity.py-4]: process started with pid [8345]
[gzclient --verbose  -2] ++ ls /usr/bin/gzclient-11.5.1
[gzclient --verbose  -2] + gzclient_path=/usr/bin/gzclient-11.5.1
[gzclient --verbose  -2] + DISPLAY=:2
[gzclient --verbose  -2] + /usr/bin/gzclient-11.5.1 --verbose
[robot_state_publisher-3] Parsing robot urdf xml string.
[robot_state_publisher-3] Link base_link had 5 children
[robot_state_publisher-3] Link caster_back_link had 0 children
[robot_state_publisher-3] Link imu_link had 0 children
[robot_state_publisher-3] Link base_scan had 0 children
[robot_state_publisher-3] Link wheel_left_link had 0 children
[robot_state_publisher-3] Link wheel_right_link had 0 children
[robot_state_publisher-3] [INFO] [1686754483.699606502] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-3] [INFO] [1686754483.699710315] [robot_state_publisher]: got segment base_link
[robot_state_publisher-3] [INFO] [1686754483.699733147] [robot_state_publisher]: got segment base_scan
[robot_state_publisher-3] [INFO] [1686754483.699745981] [robot_state_publisher]: got segment caster_back_link
[robot_state_publisher-3] [INFO] [1686754483.699761818] [robot_state_publisher]: got segment imu_link
[robot_state_publisher-3] [INFO] [1686754483.699775695] [robot_state_publisher]: got segment wheel_left_link
[robot_state_publisher-3] [INFO] [1686754483.699788943] [robot_state_publisher]: got segment wheel_right_link
[gzclient --verbose  -2] Gazebo multi-robot simulator, version 11.5.1
[gzclient --verbose  -2] Copyright (C) 2012 Open Source Robotics Foundation.
[gzclient --verbose  -2] Released under the Apache 2 License.
[gzclient --verbose  -2] http://gazebosim.org
[gzclient --verbose  -2]
[gzserver-1] Gazebo multi-robot simulator, version 11.5.1
[gzserver-1] Copyright (C) 2012 Open Source Robotics Foundation.
[gzserver-1] Released under the Apache 2 License.
[gzserver-1] http://gazebosim.org
[gzserver-1]
[spawn_entity.py-4] [INFO] [1686754484.665513883] [spawn_entity]: Spawn Entity started
[spawn_entity.py-4] [INFO] [1686754484.666447194] [spawn_entity]: Loading entity XML from file /home/user/simulation_ws/install/turtlebot3_gazebo/share/turtlebot3_gazebo/models/turtlebot3_burger/model.sdf
[spawn_entity.py-4] [INFO] [1686754484.670596959] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30
[spawn_entity.py-4] [INFO] [1686754484.671524692] [spawn_entity]: Waiting for service /spawn_entity
[gzserver-1] [Msg] Waiting for master.
[gzserver-1] [Msg] Connected to gazebo master @ http://192.168.64.6:11345
[gzserver-1] [Msg] Publicized address: 192.168.64.6
[gzserver-1] Warning [parser.cc:723] Can not find the XML attribute 'version' in sdf XML tag for model: ring_road_v2. Please specify the SDF protocol supported in the model configuration file. The first sdf tag in the config file will be used
[gzserver-1] Warning [parser.cc:723] Can not find the XML attribute 'version' in sdf XML tag for model: triangular_prism. Please specify the SDF protocol supported in the model configuration file. The first sdf tag in the config file will be used
[gzserver-1] Warning [parser.cc:723] Can not find the XML attribute 'version' in sdf XML tag for model: triangular_prism_direccion_obligada. Please specify the SDF protocol supported in the model configuration file. The first sdf tag in the config file will be used
[gzserver-1] Warning [parser.cc:723] Can not find the XML attribute 'version' in sdf XML tag for model: triangular_prism_direccion_obligada. Please specify the SDF protocol supported in the model configuration file. The first sdf tag in the config file will be used
[gzserver-1] Warning [parser.cc:723] Can not find the XML attribute 'version' in sdf XML tag for model: triangular_prism. Please specify the SDF protocol supported in the model configuration file. The first sdf tag in the config file will be used
[gzserver-1] Warning [parser.cc:723] Can not find the XML attribute 'version' in sdf XML tag for model: triangular_prism_pedestrian. Please specify the SDF protocol supported in the model configuration file. Thefirst sdf tag in the config file will be used
[gzserver-1] Warning [parser.cc:723] Can not find the XML attribute 'version' in sdf XML tag for model: triangular_prism_pedestrian. Please specify the SDF protocol supported in the model configuration file. Thefirst sdf tag in the config file will be used
[gzclient --verbose  -2] [Msg] Waiting for master.
[gzclient --verbose  -2] [Msg] Connected to gazebo master @ http://192.168.64.6:11345
[gzclient --verbose  -2] [Msg] Publicized address: 192.168.64.6
[gzclient --verbose  -2] [Wrn] [GuiIface.cc:120] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/user/.gazebo/models/RubberDucky"
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/user/.gazebo/models/bases"
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/user/.gazebo/models/lms1xx"
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/user/.gazebo/models/media"
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/user/.gazebo/models/meshes"
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/user/.gazebo/models/sensors"
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/user/.gazebo/models/turtlebot3_description"
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/user/.gazebo/models/wheels"
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/user/simulation_ws/install/turtlebot3_gazebo/share/turtlebot3_gazebo/models/bases"
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/user/simulation_ws/install/turtlebot3_gazebo/share/turtlebot3_gazebo/models/sensors"
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/user/simulation_ws/install/turtlebot3_gazebo/share/turtlebot3_gazebo/models/wheels"
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/user/simulation_ws/install/turtlebot3_description/share/ament_index"
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/user/simulation_ws/install/turtlebot3_description/share/colcon-core"
[gzclient --verbose  -2] [Err] [InsertModelWidget.cc:402] Missing model.config for model "/home/user/simulation_ws/install/turtlebot3_description/share/turtlebot3_description"
[spawn_entity.py-4] [INFO] [1686754485.929335618] [spawn_entity]: Calling service /spawn_entity
[gzserver-1] [INFO] [1686754486.175265154] [turtlebot3_imu]: <initial_orientation_as_reference> is unset,using default value of false to comply with REP 145 (world as orientation reference)
[spawn_entity.py-4] [INFO] [1686754486.362431054] [spawn_entity]: Spawn status: SpawnEntity: Successfullyspawned entity [burger]
[INFO] [spawn_entity.py-4]: process has finished cleanly [pid 8345]
[gzserver-1] [INFO] [1686754486.530529379] [turtlebot3_diff_drive]: Wheel pair 1 separation set to [0.160000m]
[gzserver-1] [INFO] [1686754486.530617758] [turtlebot3_diff_drive]: Wheel pair 1 diameter set to [0.066000m]
[gzserver-1] [INFO] [1686754486.533437895] [turtlebot3_diff_drive]: Subscribed to [/cmd_vel]
[gzserver-1] [INFO] [1686754486.536170391] [turtlebot3_diff_drive]: Advertise odometry on [/odom]
[gzserver-1] [INFO] [1686754486.538869592] [turtlebot3_diff_drive]: Publishing odom transforms between [odom] and [base_footprint]
[gzserver-1] [INFO] [1686754486.570710122] [turtlebot3_joint_state]: Going to publish joint [wheel_left_joint]
[gzserver-1] [INFO] [1686754486.571160237] [turtlebot3_joint_state]: Going to publish joint [wheel_right_joint]

What I am missing?

I don’t think you’re missing anything. Those red messages are [INFO] but not an issue when running the simulation.

Those models don’t have anything to do with the robot, that’s just the color of the simulation.

You have gazebo open in your screenshot, I’m pretty sure if you do a ros2 topic list you’ll see that the simulation is working.

Hello @roalgoal , thank you for the reply.
I have start the same course with Python and since I get the same grey model, I had perform some tests and the robot is working. I am used to find the light grey part (or nothing) when Gazebo can not find the models.
This week I will start the C++ project and check if its working. Anyway I can not understand why I can not perform the first source in C++… in the Python project If I remember correctly its working.

Is still correct that the first project instruction gives back an error?
I mean this one:

user:~$ source ~/simulation_ws/install/setup.bash
not found: "/home/user/ros2_ws/install/turtlebot3_node/share/turtlebot3_node/local_setup.bash"

Does this actually affect the simulation? Can you move the robot, echo the scan?

That isn’t an error message, but just that it can’t find a package that was previously there (it’s in simulation_ws now)

Hi @roalgoal, yes the simulation is working. I have completed the first two parts of the project.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.