Quantcast
Channel: Gazebo: Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 7017

Create visuals from c++ plugin during runtime

$
0
0
I am writing a custom muscle system and struggling with visualizing my muscles. I would like to create visual elements (cylinders) through my plugin for each muscle that I instantiate. These visual elements should then be available for updating their position, scale and color during runtime. I can see that the Sonar plugin does something similar (https://github.com/arpg/Gazebo/blob/master/gazebo/rendering/SonarVisual.cc) and I have found the BlinkVisualPlugin example for reference on visual plugins, but I must admit that I haven't found much else documentation on the matter and I am a bit unsure of how to put it together. My understanding so far is, that I create my muscles through a model plugin (or maybe a world plugin?) and that visuals should be created through a visual plugin? But how/where I instantiate/create new visuals when new muscles are instantiated, I am not sure about. Neither do I know where I should attach the visual plugin to the world file? I have seen examples of a visual plugin subscribing to topics that define their state (ie. pose, scale and color), which I guess is a way to get a model plugin and a visual plugin to talk. If anyone know of a working example or can post a minimal (pseudo) code that does something similar, it would be much appreciated! Thanks in advance

Viewing all articles
Browse latest Browse all 7017

Trending Articles