Remove Grid Lines Programmatically

asked 2022-02-22 14:57:38 -0600

Green01 gravatar image

updated 2022-02-22 15:06:00 -0600

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!

edit retag flag offensive close merge delete

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).

gvdhoorn gravatar image gvdhoorn  ( 2022-02-23 02:16:36 -0600 )edit

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

Green01 gravatar image Green01  ( 2022-02-23 06:55:58 -0600 )edit