0
$\begingroup$

Rosanswers logo

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.


Originally posted by K. Zeng on ROS Answers with karma: 23 on 2014-09-05

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2014-09-06

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by K. Zeng on 2014-09-09:
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?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.