Ask Your Question
1

Display an image in gazebo

asked 2012-02-29 20:09:34 -0600

erpa gravatar image

Hello, I wanted to simulate in Gazebo a system using a known target and a camera to compute the pose of the camera itself. I will use the ar_pose package the problem is that I am not able to display the know target. I'have tried creating a mesh (with blender) of the target and apply it to an object but I am having big trouble. First I don't know how to handle the material, I tryed to point, in the urdf, at the material file created with blender but it doesn't work and if I use a standrad material (like "blue") it doesn't display anything. Thanks for your help!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-03-02 06:56:49 -0600

hsu gravatar image

one example might be a image material script defined as material GazeboWorlds/Face in the materials script with corresponding image and the gazebo model.

edit flag offensive delete link more
0

answered 2012-02-29 23:23:23 -0600

TheLegace gravatar image

There is a great tutorial on the pr2 page about implementing sensors using Gazebo and then how you can pass the image topic to image_proc which can display it.

As for stereo cameras I managed to get that working as well if anyone is interested, I have been meaning to write a guide, hopefully by this week.

Unfortunately ros site is down so I can't access any tutorial pages but you know what to look for.

As for the material, once ros is up I can maybe address that issues as well.

But getting into basics, you basically need to create a link joint to connect with your robot or whatever. Then you need to create a frame joint which you attach to the gazebo code that can be found from the gazebo_plugins page for a camera. But the pr2 tutorial should cover it all.

Generally if you want to made a certain link a material you enter this code in

<gazebo reference="link_name">
    <material>PR2/Blue</material>
</gazebo>

Now I am sure that is the write code, but can't verify, check any of the pr2 files to see an example. But basically you have to reference a link in which gazebo applies the material. As for loading in materials just see how PR2 does it.Blockquotesdsdsd<blah>Blockquote

edit flag offensive delete link more

Comments

1

Thanks for your answer but I don't think I made myself clear.I wanted to show an image in GAZEBO, my idea was to create a mesh of a cube and apply a texture (showing the image) to it. After some work I'm now able to spawn the mesh but not to apply the texture, can you explain me how to do it?

erpa gravatar imageerpa ( 2012-03-02 03:39:11 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-02-29 20:09:34 -0600

Seen: 1,696 times

Last updated: Mar 02 '12