ika-rwth-aachen / acdc

Code Repository for the MOOC "Automated and Connected Driving Challenges" available on edX.
https://www.edx.org/course/automated-and-connected-driving-challenges
MIT License
217 stars 24 forks source link

rviz GUI not showing up. #16

Closed Sunpreet29 closed 1 year ago

Sunpreet29 commented 1 year ago

While going through the steps to setup rviz, I encountered the same error when the command rqt was typed in terminal. Although the error did not seem to have much effect because an empty rqt window popped up. However, I suspect it to be an issue when rviz is typed. i cannot see the RVIZ window popping up. The error in both cases is libGL error: MESA-LOADER: failed to retrieve device information

Also, I have attached the screeshot below of three terminal windows when executing rviz Screenshot from 2023-10-24 00-09-47

For reference, I have also attached below the screenshots of terminal windows when running rqt Screenshot from 2023-10-23 18-23-22

Thanks in advance. Sunpreet

TillBeemelmanns commented 1 year ago

Hi,

I would suggest to turn off hardware acceleration for rviz in your case. Checkout the following link: https://wiki.ros.org/rviz/Troubleshooting#Turning_off_hardware_acceleration

Can you try to start rviz with ?

export LIBGL_ALWAYS_SOFTWARE=1
rosrun rviz rviz

Let me know if the works or not.

Bests, Till

Sunpreet29 commented 1 year ago

Hello,

I ran these two commands, but still faced an error. However, this time it was different. The screenshot is attached below. Screenshot from 2023-10-26 12-16-31 I searched about this error on internet and found that I need to run roscore in another terminal before running rviz. I did that and then I could see the rviz window popping up as shown in the course. Then I closed all my terminal windows and ran rviz, but this time without running roscore before. As a result, I faced the same error as shown in the screenshot above (could not contact ROS master). Is this of any concern later, or can I ignore this behaviour?

TillBeemelmanns commented 1 year ago

Yay, it seems that the problem is resolved and RVIZ seems to work !

Please read our guides carefully: https://github.com/ika-rwth-aachen/acdc/wiki/Setup-ROS-Coding-Environment#docker-rviz-test. You need three terminals.

  1. To start the container
  2. To run roscore
  3. To run rviz

All of them need to be opened at the same time ! And roscore needs to run before you open RVIZ!

TillBeemelmanns commented 1 year ago

The only problem now is, that you have to set the environment variable LIBGL_ALWAYS_SOFTWARE every time you want to start RVIZ. I will talk to my colleagues and we will try to figure out if we can integrate the automatic setting of this variable on startup of the container for MESA GPU cards. Until then you would have to manually set export LIBGL_ALWAYS_SOFTWARE=1 in the terminal before running RVIZ.

Sunpreet29 commented 1 year ago

Thank you for the help. I'll be careful about it.