ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

RVIZ Interactive Markers - color change runtime

asked 2014-05-29 02:07:35 -0500

thomasL gravatar image


I was wondering if it was possible to change the color of an Interactive Markers during run time? I tried to change the color of the mesh embedded in the Interactive Markers but nothing occurs when I update the Server:


The architecture of my Interactive Markers is :

visualization_msgs::Marker robot_mesh;
visualization_msgs::InteractiveMarkerControl robot_control; //contain robot_mesh
visualization_msgs::InteractiveMarker robot_marker; //contain robot_control


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2016-04-11 21:35:18 -0500

A solution that worked for me was to just clear all interactive markers and reinsert them all with the new colors. Surprisingly, this works even while a marker is being dragged in rviz

edit flag offensive delete link more

answered 2019-04-08 15:06:16 -0500

In python its as easy as changing the markers color attribute.

marker = server.get("marker_name")
marker.controls[0].markers[0].color.r = 150
marker.controls[0].markers[0].color.g = 0
marker.controls[0].markers[0].color.b = 0
edit flag offensive delete link more


It does change but not as you drag the marker for me. I need to hit reset or toggle transparency box to make the update happen

rostoast gravatar image rostoast  ( 2019-08-15 09:51:59 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2014-05-29 02:07:35 -0500

Seen: 1,138 times

Last updated: Apr 11 '16