malintha / multi_uav_simulator

A drone swarm simulator based on ROS (Robot Operating System).
GNU General Public License v3.0
126 stars 14 forks source link

3d model quadcopters not visible #10

Open knmcguire opened 2 years ago

knmcguire commented 2 years ago

Hi!

Awesome simulation! But I ran against small problem. It seems that the quadcopter models are not visible when I try it on my computer eventhough I do find the .dae files in the directory downloaded with the repo:

OS: Ubuntu 20.04 ROS noetic

rviz_screenshot_2022_02_18-16_58_12

got some log files here but they are not indicating any errors.

master.log roslaunch-kimberly-ThinkPad-T460p-55689.log

malintha commented 2 years ago

Hey,

Thanks for trying it out and opening the issue! I can see the ros params for the drones being published in the master.log. They are supposed store the rendered urdf output and pass that into the corresponding robotmodel.

[rosmaster.master][INFO] 2022-02-18 16:58:01,210: +PARAM [/cf1] by /roslaunch
[rosmaster.master][INFO] 2022-02-18 16:58:01,211: +PARAM [/cf2] by /roslaunch
[rosmaster.master][INFO] 2022-02-18 16:58:01,211: +PARAM [/cf3] by /roslaunch
[rosmaster.master][INFO] 2022-02-18 16:58:01,211: +PARAM [/cf4] by /roslaunch
[rosmaster.master][INFO] 2022-02-18 16:58:01,211: +PARAM [/cf5] by /roslaunch

I suspect it could be that the RobotModels missing from Rviz when populating it with the simulation.rviz file (although strange that we can see all the other markers). There should be 5 RobotModel elements with the description as cf1 - cf5. Can you please check if they are there in the displays pane in Rviz? Selection_002

knmcguire commented 2 years ago

It seems to be pretty similar to your display tab as well. Bit strange...

Can also be related to my opengl version? Thats

$ glxinfo | grep "OpenGL version"
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.2.6

And the ros print out also had these lines:

[ INFO] [1645456079.199418091]: rviz version 1.14.10
[ INFO] [1645456079.199477225]: compiled against Qt version 5.12.8
[ INFO] [1645456079.199492299]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1645456079.210905179]: Forcing OpenGl version 0.
[ INFO] [1645456079.517119766]: Stereo is NOT SUPPORTED
[ INFO] [1645456079.517189228]: OpenGL device: Mesa Intel(R) HD Graphics 530 (SKL GT2)
[ INFO] [1645456079.517220293]: OpenGl version: 4,6 (GLSL 4,6) limited to GLSL 1.4 on Mesa system.

Wonder what the 'limited to GLSL 1.4' implies too.. perhaps this is a generic RVIZ bug?

Screenshot from 2022-02-21 16-09-14

malintha commented 2 years ago

Apparently, it is somewhat of a known bug with Rviz and certain graphic drivers. I tested on a fresh ROS Noetic installation on another Ubuntu 20.04 Laptop with Intel graphics. The CLI output was pretty similar to yours, but it displayed the robot models.

[ INFO] [1645334491.049737087]: rviz version 1.14.14
[ INFO] [1645334491.049779913]: compiled against Qt version 5.12.8
[ INFO] [1645334491.049786825]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1645334491.055008469]: Forcing OpenGl version 0.
[ INFO] [1645334491.191081338]: Stereo is NOT SUPPORTED
[ INFO] [1645334491.191120985]: OpenGL device: Mesa Intel(R) Xe Graphics (TGL GT2)
[ INFO] [1645334491.191140222]: OpenGl version: 4.6 (GLSL 4.6) limited to GLSL 1.4 on Mesa system.

With a bit of searching it seems like we can force RViz to use software graphics rendering when the dedicated graphics is not present by setting export LIBGL_ALWAYS_SOFTWARE=1. Apparently, it is a temporary workaround for Windows Subsystem for Linux, but not sure how well it would work for native Ubuntu. Found these instructions at https://github.com/ros-planning/moveit/issues/3006 and https://github.com/microsoft/wslg/issues/554.

knmcguire commented 2 years ago

Yes I remembered that from when I was trying out ros from WSL and xserver. But this is on a Ubuntu 20.04, and I tried to export the same variable and it has not solved it, so there is probably something else going on...

Anyway, I'll try to investigate this a bit more. At least this issue can warn people if they are seeing the same thing