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

Revision history [back]

click to hide/show revision 1
initial version

The openni driver does not allow streaming both ir and rgb, and the driver also has a bug that prevents you from switch between ir and rgb. When you receive an rgb image from the openni, and then later subscribe to the ir topic, the driver will crash.

The openni driver does not allow streaming both ir and rgb, and rgb at the driver also has same time, but there is a bug that prevents you from way to switch between ir mode and rgb. rgb mode. The driver looks at the number of subscribers on the rgb and ir topics, and based on the number of subscribers decides to enable ir mode or rgb mode. When you receive an have one or more subscribers to the rgb image from topic, the openni, driver will be in rgb mode, independent of the number of subscribers to the ir topic. When you have zero subscribers to the rgb topic and then later subscribe one or more subscribers to the ir topic, the driver will crash.be in ir mode.

To implement this, you can use the ros::topcic::WaitForMessage method. This method will subscribe to a topic, receive one message, and then unsubscribe from the topic. So you can call this method sequentially on the rgb and the ir topic to switch between rgb/ir mode and receive rgb/ir images.