ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

The callback is never accessed. Change

self.sub = rospy.Subscriber('/camera/depth/image_rect_raw',Image,callback)

to

self.sub = rospy.Subscriber('/camera/depth/image_rect_raw', Image, self.callback)

Some additional comments:

  • If you just want to view images, use rqt_image_view instead
  • use ROS logging instead of prints, that way you can use all the tools associated with it
  • consider using a linter, I see several PEP8 violations ;)