using camera sensor in Gazebo.
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.
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
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.
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">
<imageFormat>R8G8B8</imageFormat>
<imageSize>704 480</imageSize>
<hfov>45</hfov>
<nearClip>0.1</nearClip>
<farClip>100</farClip>
<updateRate>20.0</updateRate>
<controller:gazebo_ros_prosilica name="${name}_controller" plugin="libgazebo_ros_prosilica.so">
<alwaysOn>true</alwaysOn>
<updateRate>20.0</updateRate>
<imageTopicName>/ptz/image_raw</imageTopicName>
<cameraInfoTopicName>/ptz/camera_info</cameraInfoTopicName>
<pollServiceName>/ptz/request_image</pollServiceName>
<frameName>${name}_head</frameName>
<CxPrime>1224.5</CxPrime>
<Cx>1224.5</Cx>
<Cy>1025.5</Cy>
<focal_length>2955</focal_length>
<distortion_k1>0.0</distortion_k1>
<distortion_k2>0.0</distortion_k2>
<distortion_k3>0.0</distortion_k3>
<distortion_t1>0.0</distortion_t1>
<distortion_t2>0.0</distortion_t2>
<interface:camera name="${name}_iface" />
</controller:gazebo_ros_prosilica>
</sensor:camera>
</gazebo>
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.
hi,
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.
Asked: 2011-11-16 00:45:28 -0500
Seen: 7,788 times
Last updated: Nov 17 '11
In Gazebo, my robot can't see AR tag
Access Gazebo main camera parameters [closed]
how to do slam with a custom robot in Gazebo?
Manipulator breaking joint limits and going through its own body in Gazebo in ROS2
Gazebo world not reset on fresh launch
change Gazebo initial position of the arm
how to simulate solidworks 3d model in gazebo using ros2 humble and ubuntu 22.04