Gazebo | Ignition | Community
Ask Your Question

jonesv's profile - activity

2022-01-03 08:26:48 -0500 received badge  Famous Question (source)
2021-04-29 11:09:50 -0500 received badge  Notable Question (source)
2021-04-22 10:48:36 -0500 received badge  Popular Question (source)
2021-04-22 10:02:40 -0500 edited question Draw an arrow from a VisualPlugin

Draw an arrow from a VisualPlugin I would like to draw an arrow from a VisualPlugin, much like the 3 arrows that appear

2021-04-18 20:10:30 -0500 marked best answer Render plugin force for debugging

I have a plugin that is applying a force on a link, and I would want that plugin to inject a visual for that force into the link. For instance, say that the link is a box, and my plugin applies a force on the side of the box that makes it translate in the world, I would want my plugin to add an arrow showing that force.

Because I don't know how to make an arrow, for now let's say I just draw a sphere where that force applies. So in my plugin's Load function, I get the model and the SDF:

void MyPlugin::Load(physics::ModelPtr model, sdf::ElementPtr sdf)

I can get the link, say my_link, with model->GetLink("my_link"). And I would like to inject the following visual into it:

  <visual name='test_sphere_visual'>
    <pose>0 0 1</pose>
    <geometry>
      <sphere>
          <radius>0.05</radius>
      </sphere>
    </geometry>
  </visual>

I have been following the "spawn spheres" tutorial, where I successfully manage to create an msgs::Model from a string and inject it into the world. But in this case, instead of injecting a whole new model, I want to inject a visual into an existing link.

Is there a way to do that from a plugin?

2021-04-18 20:10:30 -0500 received badge  Scholar (source)
2021-04-18 20:10:06 -0500 commented answer Render plugin force for debugging

(BTW I cannot upvote your question because I don't have the required karma...). I asked about the VisualPlugin here

2021-04-18 20:09:49 -0500 commented answer Render plugin force for debugging

(BTW I cannot upvote your question because I don't have the required karma...)

2021-04-18 20:09:02 -0500 answered a question Render plugin force for debugging

The only way I have found is to create a VisualPlugin and send the force as a message to it. So in the Load() function

2021-04-18 19:58:01 -0500 asked a question Draw an arrow from a VisualPlugin

Draw an arrow from a VisualPlugin I would like to draw an arrow from a VisualPlugin, much like the 3 arrows that appear

2021-04-18 19:47:01 -0500 commented answer Render plugin force for debugging

I managed to send the force as a Vector3d to a VisualPlugin. Would you have a suggestion to draw the vector? Can a Visua

2021-04-17 19:18:41 -0500 commented answer Render plugin force for debugging

Thanks for the answer! It's a lift force coming from a plugin (it's a plane), so I guess that's not considered as a "con

2021-03-17 15:28:54 -0500 received badge  Notable Question (source)
2021-03-06 07:23:06 -0500 received badge  Popular Question (source)
2021-03-05 17:53:11 -0500 received badge  Enthusiast
2021-03-04 17:00:53 -0500 commented answer How to add a dynamic visual marker in gazebo?

Does it have to be done from a visual plugin? I have a plugin that gives me a ModelPtr, and the plugin computes and appl

2021-03-04 16:57:04 -0500 edited question Render plugin force for debugging

Inject a visual into an existing link (to draw forces) I have a plugin that is applying a force on a link, and I would w

2021-03-04 16:43:37 -0500 commented question Create visuals from c++ plugin during runtime

Did you ever find a way?

2021-02-27 11:41:56 -0500 received badge  Editor (source)
2021-02-27 11:41:56 -0500 edited question Render plugin force for debugging

Inject a visual into an existing link I have a plugin that is applying a force on a link, and I would want that plugin t

2021-02-26 21:25:49 -0500 asked a question Render plugin force for debugging

Inject a visual into an existing link I have a plugin that is applying a force on a link, and I would want that plugin t