Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not subscribe to camera topics via Python/Cpp Node #47

Open
bi3ri opened this issue Apr 7, 2022 · 0 comments
Open

Can not subscribe to camera topics via Python/Cpp Node #47

bi3ri opened this issue Apr 7, 2022 · 0 comments

Comments

@bi3ri
Copy link

bi3ri commented Apr 7, 2022

Hey,

I am not able to subscribe to the camera topics via C++/Python nodes. Visualization in Rviz and RQT works though.

I wrote a small demo program:

import rospy
from sensor_msgs.msg import Image as msg_Image

def callback(data):
    print("hello")
    
def listener():
    rospy.init_node('listener')
    depth_image_topic = 'camera/color/image_raw'
    sub = rospy.Subscriber(depth_image_topic, msg_Image, callback)

    rospy.spin()

if __name__ == '__main__':
    listener()

And although I can see a video stream for the topic camera/color/image_raw in RVIZ and RQT, the callback function is never called, so "hello" is never printed.

If I use the Kinect plugin everything is fine and the callback function is called and "hello" is printed many times.

Did someone had the same problem or a hint, where I could take a look?

Cheers,
Johannes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant