Greetings,
Now I’m trying the unit 2 of course “Advanced ROS2 Navigation”, and I can not open rviz2.
I understand the different between ROS1 and ROS2.
To make the environment clearly, I check the contents below are not in the file “~/.bashrc”:
source /opt/ros/noetic/setup.bashrc
source /opt/ros/galactic/setup.bashrc
And do the instruction below:
$ unset ROS_DISTRO
$ unset PYTHONPATH
Finally, I find the magic and interesting things:
- I can run rviz successfully without sourcing the file “/opt/ros/noetic/setup.bash”
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
[ INFO] [1682387027.024471034]: rviz version 1.14.20
[ INFO] [1682387027.024533696]: compiled against Qt version 5.12.8
[ INFO] [1682387027.024556536]: compiled against OGRE version 1.9.0 (Ghadamon)
- I can find rviz2 but can not run rviz2 with some error
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
[rospack] Error: package 'rviz_common' not found
[librospack]: error while executing command
[INFO] [1682387039.477222067] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [1682387039.477358811] [rviz2]: OpenGl version: 4.5 (GLSL 4.5)
[rospack] Error: package 'rviz_common' not found
[librospack]: error while executing command
So my question is why I can run rviz without sourcing anything? And is that the problem result in launching “navigation.launch.py” error with the node “rviz2”?