Robotics StackExchange | Archived questions

Remove Grid Lines Programmatically

I am using Ubuntu 20.04 and ROS Noetic. In RViz, I can add/remove the grid lines by clicking the Grid checkbox in the Displays panel (highlighted in red in the screenshot below).

C:\fakepath\1.png

Rather than using the Displays panel, I'd like to be able to add/remove grid lines from a rqt plugin I created. Is there a programmatic way to add/remove the grid lines? I haven't found any information on what the Grid checkbox is actually doing when it is checked/unchecked.

Any help is much appreciated!

Asked by Green01 on 2022-02-22 15:57:38 UTC

Comments

quick comment: that checkbox is a property of the plugin display.

You'd have to find the display instance, "reach in", retrieve the property and then set it to a different value.

I don't have any code to show you (hence only a comment), but I'd search around for "how to set properties of rviz display plugins" (or similar keywords).

Asked by gvdhoorn on 2022-02-23 03:16:36 UTC

Thanks for the information. I will do some searching using your suggestion.

Asked by Green01 on 2022-02-23 07:55:58 UTC

Answers