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?