Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

That's just how spawn model works. There is nothing that should tie those two models together unless you write it. So I see two approaches:

1) Write a tiny plugin that looks at the position of the other model you're trying to follow and sets it's position relative to that. I believe a world plugin might be the best idea here, although model plugin is also probably possible. Check out both of them, I'm not sure which will be easier

2) Append to the existing model instead of spawning a new one. This time we definitely need a model plugin. Add a model plugin to your model that you can send a message to that will add/remove a static link to the model. Updating a model during runtime is definitely possible. If you need help with though search for other questions or make a new one.