Gazebo | Ignition | Community
Ask Your Question
0

Show custom physicsMsg

asked 2016-06-27 09:13:52 -0500

aaggjajptj gravatar image

I have implemented my own physics engine into Gazebo through System plugin. The next that I want to do is to publish my own physicsMsg and show them on property pane. It's easy for me to understand how to create the custom message and publish it. But I have no idea how to show it on the property pane. Is it possible to show it. in that case, how to do?

Thanks,

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-06-27 10:46:10 -0500

chapulina gravatar image

Wow, you've integrated your physics engine with Gazebo using a system plugin, that's amazing!

Not sure exactly how your implementation works, but here's how it works for the default physics engines:

  1. gui::ModelListWidget publishes a request for physics_info here.

  2. When the running physics engine is ODE for example, physics::ODEPhysics fills a message with physics info here

  3. gui::ModelListWidget checks the response corresponds to the request it sent here and fills the panel here.

So I think you'd somehow need to subscribe to ~/request for physics_info and publish your message to ~/response. But I think you'll need to make sure the default physics engine doesn't respond first.

edit flag offensive delete link more

Comments

Thank you for your message. I could figure out how physics info on GUI is being updated from a physics engine. Another thing is that I am wondering if I could implement my own msg::Physics message passing between gui and an engine , such as what you explained in the first answer, through plugin system. Because I would like to deploy only the plugin to my team members

aaggjajptj gravatar imageaaggjajptj ( 2016-06-30 09:20:59 -0500 )edit

Have you tried subscribing to `~/request` from your plugin and sending your own physics message in the response?

chapulina gravatar imagechapulina ( 2016-06-30 11:14:15 -0500 )edit

Yes, I tried. I could see some parameters in msgs::Physics updating on the model list pane regarding to every response from my physics engine. In this case, I just inserted code subscribing ~/response in my physics. The next I want to do is to send another msgs::Physics which I newly defines, such as msgs::Physics2, to gui. Is it acceptable for the model list pane to show the new msg without code modification in ModelListWidget class?

aaggjajptj gravatar imageaaggjajptj ( 2016-07-04 07:17:41 -0500 )edit

Oh I see, adding your own custom fields to the ModelListWidget will be difficult, or maybe even impossible, without changing the Gazebo source code.

chapulina gravatar imagechapulina ( 2016-07-05 11:40:49 -0500 )edit

Your comment is the same as my understanding. I don't get in depth of the gui any more. Thanks!

aaggjajptj gravatar imageaaggjajptj ( 2016-07-07 07:39:06 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-06-27 09:13:52 -0500

Seen: 495 times

Last updated: Jun 27 '16