Rviz error in Rosject

Hello,

The Jupyter Notebook for “ROS2 Basics Python Real Robot Project” says to open rviz. I would like to do this in order to debug how my robot reacts to the laser scan data, both in simulation and on the real robot.

However, all that’s written about rviz is just the command: “rviz”

As a beginner, naively opening a new shell and typing “rviz” doesn’t work. So I tried the following:

Shell 1:

source /opt/ros/noetic/setup.bash
source ~/simulation_ws/devel/setup.bash
roslaunch realrobotlab main.launch

Shell 2:

source ~/.bashrc_bridge
ros2 run ros1_bridge dynamic_bridge --bridge-all-topics

Shell 3:

source /opt/ros/noetic/setup.bash
source ~/simulation_ws/devel/setup.bash
rviz

But Rviz shows a number of errors. Is this a problem with the environment or am I launching Rviz incorrectly?

Here’s a selection of the errors shown in Rviz:

Unknown frame map
No transform from [base_footprint] to [map]
For frame [base_scan]: Fixed Frame [map] does not exist

And here is the output on launching rviz. There are a number of warnings that look similar to what can be seen in Rviz.

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-user’
[ INFO] [1663497516.670904547]: rviz version 1.14.9
[ INFO] [1663497516.671415679]: compiled against Qt version 5.12.8
[ INFO] [1663497516.672585413]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1663497517.070804487]: Forcing OpenGl version 0.
[ INFO] [1663497518.294739822, 37.049000000]: Stereo is NOT SUPPORTED
[ INFO] [1663497518.295137568, 37.049000000]: OpenGL device: llvmpipe (LLVM 10.0.0, 256 bits)
[ INFO] [1663497518.295467081, 37.050000000]: OpenGl version: 3.1 (GLSL 1.4).
[rospack] Error: package ‘turtlebot3_description’ not found
[librospack]: error while executing command
[ERROR] [1663497519.995810563, 37.645000000]: Could not load resource [package://turtlebot3_description/meshes/bases/burger_base.dae]: Unable to open file “package://turtlebot3_description/meshes/bases/burger_base.dae”.
[rospack] Error: package ‘turtlebot3_description’ not found
[librospack]: error while executing command
[ERROR] [1663497520.282432199, 37.699000000]: Could not load resource [package://turtlebot3_description/meshes/sensors/lds.dae]: Unable to open file “package://turtlebot3_description/meshes/sensors/lds.dae”.
[rospack] Error: package ‘turtlebot3_description’ not found
[librospack]: error while executing command
[ERROR] [1663497520.474633164, 37.761000000]: Could not load resource [package://turtlebot3_description/meshes/sensors/rpi_camera_v2_short.dae]: Unable to open file “package://turtlebot3_description/meshes/sensors/rpi_camera_v2_short.dae”.
[rospack] Error: package ‘turtlebot3_description’ not found
[librospack]: error while executing command
[ERROR] [1663497520.699325324, 37.849000000]: Could not load resource [package://turtlebot3_description/meshes/sensors/rpi_camera_v2_short.stl]: Unable to open file “package://turtlebot3_description/meshes/sensors/rpi_camera_v2_short.stl”.
[rospack] Error: package ‘turtlebot3_description’ not found
[librospack]: error while executing command
[ERROR] [1663497520.880701914, 37.926000000]: Could not load resource [package://turtlebot3_description/meshes/wheels/left_tire.dae]: Unable to open file “package://turtlebot3_description/meshes/wheels/left_tire.dae”.
[rospack] Error: package ‘turtlebot3_description’ not found
[librospack]: error while executing command
[ERROR] [1663497521.090437882, 38.020000000]: Could not load resource [package://turtlebot3_description/meshes/wheels/right_tire.dae]: Unable to open file “package://turtlebot3_description/meshes/wheels/right_tire.dae”.

In case it is helpful, here is the output when launching the main launch file for the rosject. I notice that there are some warnings and error messages.

user:~$ roslaunch realrobotlab main.launch… logging to /home/user/.ros/log/dc722690-373d-11ed-a17b-0242ac120003/roslaunch-4_xterm-1074.logChecking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://4_xterm:33063/

SUMMARY

PARAMETERS

  • /gazebo/enable_ros_network: True
  • /robot_description: <?xml version="1…
  • /robot_state_publisher_turtlebot3/publish_frequency: 5.0
  • /rosdistro: noetic
  • /rosversion: 1.15.11
  • /use_sim_time: True

NODES
/
gazebo (gazebo_ros/gzserver)
gazebo_gui (gazebo_ros/gzclient)
robot_state_publisher_turtlebot3 (robot_state_publisher/robot_state_publisher)
spawn_urdf (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [1098]
ROS_MASTER_URI=http://4_xterm:11311

setting /run_id to dc722690-373d-11ed-a17b-0242ac120003
process[rosout-1]: started with pid [1117]
started core service [/rosout]
process[gazebo-2]: started with pid [1131]
process[gazebo_gui-3]: started with pid [1141]
process[spawn_urdf-4]: started with pid [1149]
process[robot_state_publisher_turtlebot3-5]: started with pid [1152]
++ ls /usr/bin/gzclient-11.5.1

  • gzclient_path=/usr/bin/gzclient-11.5.1
  • DISPLAY=:2
  • /usr/bin/gzclient-11.5.1 --verbose -g /opt/ros/noetic/lib/libgazebo_ros_paths_plugin.so -g /opt/ros/noetic/lib/libgazebo_ros_api_plugin.so __name:=gazebo_gui __log:=/home/user/.ros/log/dc722690-373d-11ed-a17b-0242ac120003/gazebo_gui-3.log
    Gazebo multi-robot simulator, version 11.5.1
    Copyright (C) 2012 Open Source Robotics Foundation.
    Released under the Apache 2 License.
    http://gazebosim.org

[Wrn] [GuiIface.cc:200] g/gui-plugin is really loading a SystemPlugin. To load a GUI plugin please use --gui-client-plugin
Gazebo multi-robot simulator, version 11.5.1
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[ INFO] [1663497439.309936882]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1663497439.312697693]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting…
[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://172.18.0.3:11345
[Msg] Publicized address: 172.18.0.3
[ INFO] [1663497439.643890625]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1663497439.646410423]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting…
[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://172.18.0.3:11345
[Msg] Publicized address: 172.18.0.3
[Wrn] [GuiIface.cc:298] Couldn’t locate specified .ini. Creating file at “/home/user/.gazebo/gui.ini”
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
Warning [parser.cc:723] Can not find the XML attribute ‘version’ in sdf XML tag for model: Pedestrian. Please specify the SDF protocol supported in the model configuration file. The first sdf tag in the config file will be used
Warning [parser.cc:723] Can not find the XML attribute ‘version’ in sdf XML tag for model: Traffic Light. Please specify the SDF protocol supported in the model configuration file. The first sdf tag in the config file will be used
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
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
[Wrn] [GuiIface.cc:120] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to ‘/tmp/runtime-user’
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
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
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
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. The first sdf tag in the config file will be used
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. The first sdf tag in the config file will be used
Warning [parser.cc:723] Can not find the XML attribute ‘version’ in sdf XML tag for model: OverLoard Camera. Please specify the SDF protocol supported in the model configuration file. The first sdf tag in the config file will be used
[Msg] Loading world file [/home/user/simulation_ws/src/realrobotlab_simulation/realrobotlab/worlds/realrobotlab_v1.world]
[ INFO] [1663497440.260451179]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[Err] [InsertModelWidget.cc:402] Missing model.config for model “/home/user/.gazebo/models/RubberDucky”
[Err] [InsertModelWidget.cc:402] Missing model.config for model “/home/user/.gazebo/models/lms1xx”
[Err] [InsertModelWidget.cc:402] Missing model.config for model “/home/user/.gazebo/models/media”
[Err] [InsertModelWidget.cc:402] Missing model.config for model “/home/user/.gazebo/models/meshes”
[Err] [InsertModelWidget.cc:402] Missing model.config for model “/home/user/.gazebo/models/turtlebot3_autorace”
[Err] [InsertModelWidget.cc:402] Missing model.config for model “/home/user/.gazebo/models/turtlebot3_autorace_2020”
[Err] [InsertModelWidget.cc:402] Missing model.config for model “/home/user/.gazebo/models/turtlebot3_description”
[Err] [InsertModelWidget.cc:402] Missing model.config for model “/home/user/simulation_ws/src/turtlebot3/turtlebot3_simulations/turtlebot3_gazebo/models/turtlebot3_autorace”
[Err] [InsertModelWidget.cc:402] Missing model.config for model “/home/user/simulation_ws/src/turtlebot3/turtlebot3_simulations/turtlebot3_gazebo/models/turtlebot3_autorace_2020”

Don’t worry about the output of the rviz window. The issue here is that the global map set is “map”, but there is no “map” frame being published.

Change it to ¨base_link"

Hello,
I’m sorry but I don’t know how to do what you’re describing. That kind of thing was not covered up to this point in the course. It is a “basics” course and there hasn’t been any course content about working with rviz. This kind of thing should just work “out of the box.” Why am I having to post a question like this in this forum?

Just to make it clearer what I’m getting at. This is all that’s shown in the rosject.

I expect as a course-taker in a beginner’s course to just type rviz and get the view shown, since that’s all there is in the instructions.

I’ve searched the course instructions for anything related to rviz and came up empty. If I’ve missed something or made a mistake please show me where I went wrong.

If I haven’t, please explain why a course-taker in a beginner’s course should be expected to work with rviz in the way you suggest

1 Like

Hello @EQdAzc,
thanks for your valuable feedback, it is much appreciated.
There is a section about Rviz in Unit 6 -Debugging Tools. I assume that you have not reached Unit 6 of the course yet, so your frustration is totally understandable.
I made a note about this issue so that we can improve the instructions of the Project Notebook as soon as possible. Thanks again for sharing your thoughts.

Cheers,

Roberto

This topic was automatically closed after 4 days. New replies are no longer allowed.