How to modify a link's visual programmatically from a sensor plugin?
I'm trying to modify the visual of a link from inside a sensor plugin (not a visual plugin).
I get access to the link with:
physics::LinkPtr link = boost::dynamic_pointer_cast<physics::Link>(this->world->GetEntity(linkName));
Eventually I'd like to use gazebo::rendering::Visual::SetRotation
, but I can't figure out how to get to that point.
I have tried using:
msgs::Visual visual = link->GetVisualMessage("visual");
to get access to the visual, but after that I have not had any luck converting the gazebo::msgs::Visual
to a gazebo::rendering::Visual
.
Any tips for how to get access to a gazebo::rendering::Visual
visual from a gazebo::physics::LinkPtr
?