Unable to receive ROS image messages from TensorFlow docker container
I was using NVIDIA’s official TensorFlow docker container (R1.0) to perform object detection using a neural net. However, I cannot subscribe to ROS camera messages and therefore cannot get any input. The reason might be that the docker container requires using python3 for tensorflow, but ROS Kinetic only support python2. There is a python version mismatch and I got many errors related to opencv and cv_bridge.
Does anyone have any experience setting up TensorFlow and receiving ROS image topics at the same time?
The errors are as follows:
[ERROR] [1521770206.017362]: bad callback: <bound method image_converter.callback of <__main__.image_converter object at 0x7f926a0320>> Traceback (most recent call last): File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback cb(msg) File "src/tensorflow_v6_gpu_docker.py", line 94, in callback cv_image = self.bridge.imgmsg_to_cv2(data, "bgr8") File "/opt/ros/kinetic/lib/python2.7/dist-packages/cv_bridge/core.py", line 163, in imgmsg_to_cv2 dtype, n_channels = self.encoding_to_dtype_with_channels(img_msg.encoding) File "/opt/ros/kinetic/lib/python2.7/dist-packages/cv_bridge/core.py", line 99, in encoding_to_dtype_with_channels return self.cvtype2_to_dtype_with_channels(self.encoding_to_cvtype2(encoding)) File "/opt/ros/kinetic/lib/python2.7/dist-packages/cv_bridge/core.py", line 91, in encoding_to_cvtype2 from cv_bridge.boost.cv_bridge_boost import getCvType ImportError: dynamic module does not define module export function (PyInit_cv_bridge_boost)