Unit 2 - Example 2.6.1 - Turtle and cam_bot are not shown in RVIZ2

I have follow all the steps in exercise 2.6.1 but I can not see the robot models in RVIZ.
What can be the problem?

Hi,

It would help that you posted any error it might appear in the terminals that might give us a clue of what could be the issue.

The most common issues are:

  1. You didnt set teh correct fixed_frame in rviz.SOL: change teh fixed frame.
  2. You are not publishing the TFs. SOL: Check you launched your publisher and print the tf tree, that might give a clue of what is going on.
  3. The simulation broke for some reaosn and there is nothing to get info about. SOL: restart teh simulation with the restart simullation button on the simulation widnow.

Hi,

Thanks for your answer!
I have set the fixed_frame to “world”.
I have checked that TFs are publishing using “ros2 topic echo /tf” and see the following TF tree:

My configuration of the robots in RVIZ is the following:

RVIZ shows the frames but not the robots:

And I see that in the terminal where I execute RVIZ appears the followings error:

user:~/ros2_ws/src/ros2_tf_course$ rviz2
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-user’
[INFO] [1674672778.275261967] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [1674672778.275415360] [rviz2]: OpenGl version: 3.1 (GLSL 1.4)
[INFO] [1674672778.326124823] [rviz2]: Stereo is NOT SUPPORTED
[ERROR] [1674672854.406987239] [rviz2]: Could not load resource [package://turtle_tf_3d_ros2/meshes/turtle/turtle.dae]: Unable to open file “package://turtle_tf_3d_ros2/meshes/turtle/turtle.dae”.
[ERROR] [1674672854.407180743] [rviz2]: FileNotFoundException: Cannot locate resource package://turtle_tf_3d_ros2/meshes/turtle/turtle.dae inresource group OgreAutodetect. in ResourceGroupManager::openResource at /tmp/binarydeb/ros-galactic-rviz-ogre-vendor-8.5.0/obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/OgreMain/src/OgreResourceGroupManager.cpp (line 703)
[ERROR] [1674672854.407426427] [rviz2]: could not load model ‘package://turtle_tf_3d_ros2/meshes/turtle/turtle.dae’ for link ‘turtle_chassis’: FileNotFoundException: Cannot locate resource package://turtle_tf_3d_ros2/meshes/turtle/turtle.dae in resource group OgreAutodetect. in ResourceGroupManager::openResource at /tmp/binarydeb/ros-galactic-rviz-ogre-vendor-8.5.0/obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/OgreMain/src/OgreResourceGroupManager.cpp (line 703)
[ERROR] [1674672854.407758553] [rviz2]: Could not load resource [package://turtle_tf_3d_ros2/meshes/turtle/turtle.dae]: Unable to open file “package://turtle_tf_3d_ros2/meshes/turtle/turtle.dae”.
[ERROR] [1674672854.407851264] [rviz2]: FileNotFoundException: Cannot locate resource package://turtle_tf_3d_ros2/meshes/turtle/turtle.dae inresource group OgreAutodetect. in ResourceGroupManager::openResource at /tmp/binarydeb/ros-galactic-rviz-ogre-vendor-8.5.0/obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/OgreMain/src/OgreResourceGroupManager.cpp (line 703)
[ERROR] [1674672854.407931099] [rviz2]: could not load model ‘package://turtle_tf_3d_ros2/meshes/turtle/turtle.dae’ for link ‘turtle_chassis’: FileNotFoundException: Cannot locate resource package://turtle_tf_3d_ros2/meshes/turtle/turtle.dae in resource group OgreAutodetect. in ResourceGroupManager::openResource at /tmp/binarydeb/ros-galactic-rviz-ogre-vendor-8.5.0/obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/OgreMain/src/OgreResourceGroupManager.cpp (line 703)
[ERROR] [1674672910.509630569] [rviz2]: Could not load resource [package://turtle_tf_3d_ros2/meshes/camera_bot_meshes/camera_bot_scaled.dae]:Unable to open file “package://turtle_tf_3d_ros2/meshes/camera_bot_meshes/camera_bot_scaled.dae”.
[ERROR] [1674672910.513152463] [rviz2]: FileNotFoundException: Cannot locate resource package://turtle_tf_3d_ros2/meshes/camera_bot_meshes/camera_bot_scaled.dae in resource group OgreAutodetect. in ResourceGroupManager::openResource at /tmp/binarydeb/ros-galactic-rviz-ogre-vendor-8.5.0/obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/OgreMain/src/OgreResourceGroupManager.cpp (line 703)
[ERROR] [1674672910.513323514] [rviz2]: could not load model ‘package://turtle_tf_3d_ros2/meshes/camera_bot_meshes/camera_bot_scaled.dae’ forlink ‘chassis’: FileNotFoundException: Cannot locate resource package://turtle_tf_3d_ros2/meshes/camera_bot_meshes/camera_bot_scaled.dae in resource group OgreAutodetect. in ResourceGroupManager::openResource at /tmp/binarydeb/ros-galactic-rviz-ogre-vendor-8.5.0/obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/OgreMain/src/OgreResourceGroupManager.cpp (line 703)
[ERROR] [1674672910.513732551] [rviz2]: Could not load resource [package://turtle_tf_3d_ros2/meshes/camera_bot_meshes/camera_bot_scaled.dae]:Unable to open file “package://turtle_tf_3d_ros2/meshes/camera_bot_meshes/camera_bot_scaled.dae”.
[ERROR] [1674672910.513858588] [rviz2]: FileNotFoundException: Cannot locate resource package://turtle_tf_3d_ros2/meshes/camera_bot_meshes/camera_bot_scaled.dae in resource group OgreAutodetect. in ResourceGroupManager::openResource at /tmp/binarydeb/ros-galactic-rviz-ogre-vendor-8.5.0/obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/OgreMain/src/OgreResourceGroupManager.cpp (line 703)
[ERROR] [1674672910.513934080] [rviz2]: could not load model ‘package://turtle_tf_3d_ros2/meshes/camera_bot_meshes/camera_bot_scaled.dae’ forlink ‘chassis’: FileNotFoundException: Cannot locate resource package://turtle_tf_3d_ros2/meshes/camera_bot_meshes/camera_bot_scaled.dae in resource group OgreAutodetect. in ResourceGroupManager::openResource at /tmp/binarydeb/ros-galactic-rviz-ogre-vendor-8.5.0/obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/OgreMain/src/OgreResourceGroupManager.cpp (line 703)

How can I fix these errors?

Regards,

Jose Enrique.

Hello Jose Enrique,

apparently Rviz can’t find the meshes.

Try this:

first source the workspace where the robot models are located:

Execute in Terminal 2:

source /home/simulations/ros2_sims_ws/install/setup.bash

Then start Rviz in Terminal 2

rviz2

Hope this helps,

Roberto

Thanks Roberto!

Your solution fixed the problem.

Regards,

Jose Enrique