Rviz_common files not found when launching rviz2

Hello, I am in part three of the TF for ros2 course and rviz2 in launching. It did cause this issue in previous sections, and I tried the solution that was suggested in a ROS2 navigation question but that did not work.

To support you better, we need more details.

Please show:

  • the specific exercise or example you are running.
  • the command you ran, and it’s output in the terminal.
  • link to the suggested solution
  • Any other information that can help us debug the issue.

Okay so I am in the beginning of the broadcasting section number 3.2. When I source in the terminal the following is output on the terminal:

ROS_DISTRO was set to 'noetic' before. Please make sure that the environment does not mix paths from different distributions.

Then when I run rviz2 the following error is output :

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
[rospack] Error: package 'rviz_common' not found
[librospack]: error while executing command
[INFO] [1688734375.741719691] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [1688734375.742244516] [rviz2]: OpenGl version: 3.1 (GLSL 1.4)
[rospack] Error: package 'rviz_common' not found
[librospack]: error while executing command
[rospack] Error: package 'rviz_common' not found
[librospack]: error while executing command
[INFO] [1688734375.841294184] [rviz2]: Stereo is NOT SUPPORTED
rviz2: malloc.c:2379: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed.
Aborted (core dumped)

This is the previous solution:
https://get-help.robotigniteacademy.com/t/rviz-common-not-found-while-launching-rviz2/23205

@Abboud Thanks for providing the information.
I’ve referred the issue to one of our experts.

Hello @Abboud,

I tried to reproduce the issue that you are experiencing but I couldn’t. This is what I did:

1.- started the ROS2 TF course and opened Unit 3: TF Broadcasting and Listening
2.- waited until the terminals are shown
3.- executed source /home/simulations/ros2_sims_ws/install/setup.bash followed by rviz2

This worked as expected, Rviz2 showed up in the graphical tools window.

As a first suggestion I recommend that you launch the course again from a blank state, preferably after not having used it for a period of time. Then try the above steps again.
If this does not work, my seconds suggestion is to reset the terminals using the small icon of an arrow curved into a closing circle.

If this still does not work I recommend inspecting what packages are currently sourced in the terminal or shell by inspecting the AMENT_PREFIX_PATH variable.

Just run the following command to view the current value of AMENT_PREFIX_PATH:

echo $AMENT_PREFIX_PATH

This outputs a colon-separated list of directories where ROS2 packages are located.

Compare your value with my output and see if you can spot any differences:

/home/simulations/ros2_sims_ws/install/uniclicle_robot_pkg:/home/simulations/ros2_sims_ws/install/turtle_tf_3d_ros2:/home/simulations/ros2_sims_ws/install/spawn_robot_tools_pkg:/opt/ros/galactic

I look forward to hearing from you.

Roberto

Hello and thank you for the help,I should have updated the thread before now. When I launched the course after a while rviz2 worked perfectly and the issue just stopped. Thank you again !!

1 Like

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