Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Visual's material update from ModelPlugin in ROS Gazebo

Hello,

I'm new to ROS/Gazebo so excuse me for lame words, terms and my English... and Hi everybody here, it's my first post!

I need to update link's visual material in ModelPlugin depending on some conditions (for example, when switch is up I need to assign Gazebo/GreenGlow to the visual, when it is down then Gazebo/Grey). Can this be achieved from the code ? I tried to update SDF parameters (link->GetSDF()) - I changed <script> to necessary value but this works only once (on gazebo gui startup). After gui is shown gazebo does not update visual using current SDF values without explicit request. So I tried to call link->UpdateParameters(sdf) with an updated sdf but got only this message in the console:

Service call failed: transport error completing service call: unable to receive data from sender, check sender's logs for details Segmentation fault (core dumped) [gazebo-2] process has died [pid 1019, exit code 139, cmd /opt/ros/fuerte/stacks/simulator_gazebo/gazebo/scripts/gazebo /home/ubuntu/work/robonaut2_taskboard_controller/stacks/nasa_r2_simulator/r2_gazebo/gazebo/r2_empty.world __name:=gazebo __log:=/home/ubuntu/.ros/log/48332fd8-7695-11e2-9689-080027b96a58/gazebo-2.log]. log file: /home/ubuntu/.ros/log/48332fd8-7695-11e2-9689-080027b96a58/gazebo-2.log*

I would greatly appreciate any help on this question. Thanks.