Ask Your Question

Grab Single Frame From Gazebo Camera

asked 2014-09-05 17:59:05 -0500

K. Zeng gravatar image

I'm using Gazebo 2.2.3 along with ROS Indigo. I also have a robot with a mounted camera in Gazebo. I was wondering if there is a way to just grab a single frame from the robot's camera (not live feed) using ROS. It doesn't even have to display the image like with the image_view command.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2014-09-06 16:19:21 -0500

I believe there is no pre-made plugin that does exactly what you´re asking for. You basically have two practical options:

  • Write your own Gazebo plugin, possibly based on a existing one like gazebo_ros_camera. This gives you most control over what is actually done in Gazebo (short of diving into Gazebo´s sources themselves)
  • Create a ROS node that subscribes to (stream) data from a existing camera plugin and just forward data selectively.

The latter option certainly is the easier one to implement and would be preferred if you can live with a few wasted CPU cycles.

edit flag offensive delete link more


I understand. Now, I have an existing node that uses the gazebo/apply_joint_effort rosservice call to move my robot model. I'm assuming that it would be more practical if I just wrote a new node to stream camera data rather than trying to modify my current node to do so as well as moving the model?

K. Zeng gravatar image K. Zeng  ( 2014-09-09 14:19:59 -0500 )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



Asked: 2014-09-05 17:59:05 -0500

Seen: 455 times

Last updated: Sep 06 '14