Home | Tutorials | Wiki | Issues
Ask Your Question
0

How to programmatically attach link to a model during simulation?

asked 2016-08-07 13:50:24 -0500

jwatson_utah_edu gravatar image

Indigo on Ubuntu 14.04 with Gazebo 7.3 and Python 2.7

I have non-colliding URDF models to be used as markers in Gazebo. The markers will be attached to objects to be grasped, and their positions relative to those objects will change as planning executes. I have not found a tutorial or example of programmatically attaching a URDF model to either a world object or robot link as a link that moves with the target object. Can this be done with rospy?

I'd like to implement this in Gazebo rather than RViz because the equipment I have been provided with struggles with Gazebo on its own.

edit retag flag offensive close merge delete

Comments

for starters, you're probably going to be happier just upgrading your computer. If you can't run gazebo and rviz then whatever project you're working on is going to be miserable to work on.

Peter Mitrano gravatar imagePeter Mitrano ( 2016-08-08 10:28:04 -0500 )edit

Upgrading lab equipment isn't under my authority, but I have suggested it. Until then I'm making lemonade.

jwatson_utah_edu gravatar imagejwatson_utah_edu ( 2016-08-08 10:48:05 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-08-08 10:34:01 -0500

There aren't any good tutorials on it. It's one of the areas I think we need a lot of work, since lots of people seem to be asking for it. You're really using the wrong tool for the job, gazebo is not meant for markers. Here's what I can think of:

You can write a visual plugin

An example that generates mazes (they don't change over time though, they just get inserted once) https://github.com/PeterMitrano/gzmaz...

An example that publishes gazebo::msgs::Visualhttps://github.com/WPISmartmouse/2016...

Other relavent questions

http://answers.gazebosim.org/question... http://answers.gazebosim.org/question...

But again, you're using the wrong tool for the job. Rviz is what you want.

edit flag offensive delete link more

Comments

Thanks, I will take a look at these. ~ The traditional Gazebo / Rviz split seems a little strange to me. Gazebo has ample graphical capability, so my first instinct was to use the tool I was already using to give a very basic representation (less than 5 markers) of what is going on under the hood. Rviz is great for displaying point clouds and complex plans, but that's much more than I need at the moment.

jwatson_utah_edu gravatar imagejwatson_utah_edu ( 2016-08-08 11:14:40 -0500 )edit

You say rviz is more than you need. The ironic part is, so is gazebo. The truth is rviz *was* developed to display simple markers and points--gazebo was not. Of course it's all ogre under the hood so it's certainly possible to do, we just haven't focused on it. There isn't a lot of dedicated API for simple graphics, and no example code because no one does it. The gazebo visual markers I linked to is the *only* example of simple "markers" in gazebo that I know of.

Peter Mitrano gravatar imagePeter Mitrano ( 2016-08-08 13:08:03 -0500 )edit

It's just one of the areas where gazebo couuld improve

Peter Mitrano gravatar imagePeter Mitrano ( 2016-08-08 13:08:24 -0500 )edit

I'm flagging this as the answer, though I'm having some trouble implementing it. http://answers.gazebosim.org/question/14185/gazebophysicsget_world-crashes-node/

jwatson_utah_edu gravatar imagejwatson_utah_edu ( 2016-08-17 21:37:47 -0500 )edit

I feel you... it's a common use case that gets almost no tutorials or documentation. Next time I use it I'll add something. Feel free to make a PR when you figure it out

Peter Mitrano gravatar imagePeter Mitrano ( 2016-08-21 22:31:03 -0500 )edit

@PeterMitrano: I'd like to put one of those together once I figure that out. I have one very specific question about getting references to objects the the Gazebo world. See link: http://answers.gazebosim.org/question/14185/gazebophysicsget_world-crashes-node/ I'm not sure what you mean by PR.

jwatson_utah_edu gravatar imagejwatson_utah_edu ( 2016-08-23 13:19:25 -0500 )edit
1

PR = pull request it's a fairly commonly used acronym in open source

Peter Mitrano gravatar imagePeter Mitrano ( 2016-08-25 10:06:15 -0500 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2016-08-07 13:50:24 -0500

Seen: 867 times

Last updated: Aug 08 '16