Gazebo | Ignition | Community
Ask Your Question
0

How to change the static attribute of a model by msgs?

asked 2014-03-28 09:26:02 -0500

Sam gravatar image

updated 2014-03-28 09:34:16 -0500

The name of a existing model is "ball".My source is:

transport::PublisherPtr modelPub = this->node->Advertise<msgs::model>("~/model/modify");

msgs::Model msg;

msg.set_name("ball");

msg.set_ is_ static(true);;

modelPub->Publish(msg);

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-03-28 19:18:04 -0500

scpeters gravatar image

That is the basic pseudo-code for publishing a message, but we don't have any tests that switch a model between static and dynamic. I'm not sure it will work, since static models are initialized differently than dynamic models. Please file an issue if this capability is important to you.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-03-28 09:26:02 -0500

Seen: 397 times

Last updated: Mar 28 '14