ros2 / ros_astra_camera

ROS wrapper for Astra camera
9 stars 12 forks source link

Astra Mini compatibility #8

Open SecretaryBirds opened 7 years ago

SecretaryBirds commented 7 years ago

This is the output of the node when connecting to an Astra Mini (Astra without an enclosure, for OEMs):

Device "2bc5/0404@1/31" found. Warning: USB events thread - failed to set priority. This might cause loss of data... Warning: USB events thread - failed to set priority. This might cause loss of data... Starting color stream. Cannot stream RGB and IR at the same time. Streaming RGB only. Starting depth stream.

I couldn't see any depth images in Rviz because the frame id in the header was blank. Tracing this down, I found in the AstraDriver::newDepthFrameCallback, that the depthregistration flag is true and so it's populating the header and cam_info data with the color camera and not the depth camera.

I'm guessing this isn't the typical execution path when using a regular Astra, and so it's slightly broken. I'm happy to help fix the issue, with some pointers on the desired behavior.

SecretaryBirds commented 7 years ago

On further examination, that depthregistration flag is never initialized. So perhaps when I'm debugging in Clion, it happens to be true, and when running in command-line, it's false? Just flopping around. I'll submit a pull request with that change, at least.