URDF change color

asked 2015-03-30 23:31:51 -0500

heng gravatar image

updated 2015-03-30 23:32:28 -0500

Hi, currently I added bumper on my robot and I have my robot model with bumper. I wan to show in rviz that when the bumper get hit the respective bumper will turn from white to red color. But I couldn't find any example on to to change to color of URDF based on subscribing msg. Is anyone know how to do this? or where can I find the example?

edit retag flag offensive close merge delete



I'm not sure you can do this on the fly. You could look into writing a script that listens to collision msgs, changes your urdf/xml file during those cases and reloads the robot_description parameter using the rosparam call.

2ROS0 gravatar image 2ROS0  ( 2015-03-30 23:46:05 -0500 )edit

@2ROS0: but I doubt that would make any of the nodes that already loaded the robot_description parameter from the server automatically reload it again. There is no change notification system (well there is, but not many nodes use it).

gvdhoorn gravatar image gvdhoorn  ( 2015-03-31 01:36:43 -0500 )edit