ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
5

Unable to change the Lidar Scan data color in rviz

asked 2021-02-01 02:52:28 -0500

Hi guys,

I am running Ros noetic on a RP4 and ubuntu 20 and connect to it using another ubuntu running in VM. I can see the reading from lidar in VM rviz however the color is white when i run the rviz on the RP4 directly the color is red I also can change the color to something else however on the VM no matter what i do I am unable to do that. any idea what could be the issue and how to solve it ?

Thank you

edit retag flag offensive close merge delete

Comments

I'm not quite sure I understand your problem... The color of a LaserScan is only in the visualization. I.e. you can set it in the rviz LaserScan Display. You have to set the visualization parameters in the rviz Windows where you want to view the Laserscan. Check the Color Transformer and the relevant color properties...

mgruhler gravatar image mgruhler  ( 2021-02-01 09:21:54 -0500 )edit

I have run into the same/similar issue on native Ubuntu desktops. In hopes of clarifying, in case you or someone else has info to add: The LaserScan display worked aside from the rendering. Even with Color Transformer set to FlatColor, the color was white no matter what I did with the color property. Also, the rendered size wouldn't change despite changing that property. It always looked like the default size (0.01 m). Running the same software on a different machine worked fine.

tryan gravatar image tryan  ( 2021-02-01 10:02:58 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2021-02-01 09:40:50 -0500

tryan gravatar image

updated 2021-02-01 09:50:03 -0500

I have seen this on a few different computers, and the problem for me has always been graphics drivers. I'm not sure about your setup, but I was able to fix one (18.04, NVIDIA GTX 980) by switching to NVIDIA drivers, instead of using the default Ubuntu driver (Nouveau). I don't remember the specific steps (e.g., sudo apt-get install nvidia-driver-450, restart, etc.), but there are plenty of tutorials, like this one (not an endorsement). Here's my driver selection in Software & Updates for reference:

image description

Obviously, this will depend on your graphics card and VM configuration. Some VMs require extra effort to use the native hardware.

P.S. Solving the issue may only be a side effect of changing the drivers as I never came across a more specific solution, but it worked for me.

edit flag offensive delete link more

Comments

Had a similar problem and it worked for me :)! (my laptop couldn't cahnge any laser_scan data (color, size, etc), remote PC could)

lslabon gravatar image lslabon  ( 2021-02-11 04:09:58 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-02-01 02:52:28 -0500

Seen: 394 times

Last updated: Feb 01 '21