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

using camera sensor in Gazebo.

asked 2011-11-16 00:45:28 -0500

Maurizio88 gravatar image

updated 2014-01-28 17:10:48 -0500

ngrennan gravatar image

where can i find documentation or examples about camera sensor? I need to create a camera sensor and i need to move it around the robot.

thanks in advance.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2011-11-16 01:34:43 -0500

DimitriProsser gravatar image

You can look at the pr2 description in the pr2_description package. They have some urdf and xacro files for describing cameras. You'd want to use the prosilica_gc2450 files for a single camera (the wge100 is for stereo I believe). My camera configuration looks like this:

 <gazebo reference="${name}_head">
    <sensor:camera name="${name}_sensor">
        <imageSize>704 480</imageSize>
        <controller:gazebo_ros_prosilica name="${name}_controller" plugin="">
            <interface:camera name="${name}_iface" />

As far as making it move, that's a little more complicated. If you're just looking to make it pan/tilt in place, that's not so bad. But if you're looking to move it around on the robot, that's not going to be as easy.

If you want to make a pan/tile camera, you could model the camera much like the pr2's head, but with only a single camera. You can see how they set up two joint controllers using the pr2_controllers stack to manipulate them. I wrote a teleop program, modeled after the pr2's teleop node that publishes to my camera joint controllers. This enables me to quickly adjust the camera as I see fit.

If you're trying to make the camera change its position on the robot's frame, then you'd have to experiment with some slider joints and some more joint controllers.

edit flag offensive delete link more


Hi, another question is would the "state_publisher" publish topic "/ptz/image_raw" automatically or do we need to publish topic "/ptz/image_raw" ourselves with, for example, image_transport package?

yuquan gravatar image yuquan  ( 2012-11-02 13:51:21 -0500 )edit

answered 2011-11-17 19:40:02 -0500

Maurizio88 gravatar image


very thanks.

for first i need to create a camera and see what the camera see. Can I use some node which open a window? so i can see the camera's video.

edit flag offensive delete link more


DimitriProsser gravatar image DimitriProsser  ( 2011-11-18 03:47:03 -0500 )edit

Question Tools

1 follower


Asked: 2011-11-16 00:45:28 -0500

Seen: 7,612 times

Last updated: Nov 17 '11