ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
4

Is it possible to spawn or update a model with a new link and plugin?

asked 2021-04-26 17:06:58 -0500

jeremya gravatar image

I've been using spawn_entity.py in gazebo_ros for ROS2 to try to spawn a new camera. I really want this camera rigidly attached to a model that's already spawned in gazebo. I thought I could do this by spawning a new model with a joint from an existing base link but then I realized that doesn't make sense. Is there any way to spawn just a new link with a joint referenced from an existing model/entity?

I'm beginning to think that really the only way to do this is to remove the existing model and respawn it from a xacro that has the model updates I want. If that's true, then is there anything I should look out for to make sure there are no conflicts from the previous model? For example, this model will be receiving a twist message to keep it moving.

edit retag flag offensive close merge delete

Comments

I'm wondering whether it would be better to post this on Gazebo Answers.

It's clear there is a ROS side to this, but whether the ROS integration plugin(s) are capable of this is largely determined by the support in Gazebo for this (ie: without Gazebo supporting it, the plugins couldn't do it either).

At the very least, you'll have a better chance of getting eyes on your question from the Gazebo developer community.

gvdhoorn gravatar image gvdhoorn  ( 2021-04-27 03:12:25 -0500 )edit

You make a good point. I'll repost there.

jeremya gravatar image jeremya  ( 2021-04-27 18:04:46 -0500 )edit

Did you find any solution for your problem? I'm trying to do exactly the same, but haven't found a solution yet. (I didn't find your repost on Gazebo Answers).

hsil gravatar image hsil  ( 2022-05-11 00:57:03 -0500 )edit

Sorry. I didn't post in Gazebo answers yet. Feel free to do so. I basically decided to add it to the Xacro and use parameters to move it around for each time I spawned the entire model.

jeremya gravatar image jeremya  ( 2022-06-22 15:39:48 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-04-27 02:23:19 -0500

rotaryopt gravatar image

updated 2021-04-27 02:27:20 -0500

This would be a neat feature, but I don't believe Gazebo/ROS have the capability (as of yet) to ad-hoc model descriptions to each other. Possible reason is that even if you match the <link> and <joint> name spaces across the two model files, there is no plug-in that treats them as parent-child. Unless I misunderstood that you are just looking to re-spawn an updated model in place of the current model instance..

I would be curious if such a custom plugin can be written for Gazebo?
Otherwise, moveit2/Rviz have features for dynamic end-effector changes.

edit flag offensive delete link more

Comments

Question Tools

4 followers

Stats

Asked: 2021-04-26 17:06:58 -0500

Seen: 332 times

Last updated: Apr 27 '21