Ask Your Question
0

Adding gazebo_ros_camera to gazebo model

asked 2020-06-18 08:06:05 -0500

nihalar gravatar image

Hi All,

How would I add/attach camera to a model (like a cylinder which is defined in the world file) in Gazebo? I know how to add camera to a robot link. But I want to add camera to a standalone model defined in the world file.

Thank You,

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-06-18 08:55:15 -0500

Weasfas gravatar image

Hi @nihalar,

The short answer: Like the same way you add a camera to any robot model.

The long answer: Is related to the way you use to generate your world. In order to add a camera to a (static) Gazebo model you will need to include the model in the sdf world. Moreover, if you have a xacro macro with the camera you may just copy the model and included in an empty world. In your case you will need to define a cylinder link and attach it to a camera link in which you will define your camera sensor with the appropiate plugin.

gazebo_ros_pkgs contains exactly what you want in a demo world. This demo world simulates a bounding ball in front of a camera and publish the camera frames over a ROS topic.

For more information about the (camera) gazebo plugin you can check this tutorial.

Cheers.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-06-18 08:06:05 -0500

Seen: 484 times

Last updated: Jun 18 '20