Closed EugeneSakun closed 4 years ago
It sounds like you have a slighly non-standard setup. If you need more help debugging this, please ask you question on http://answers.ros.org according to our support policy: http://wiki.ros.org/Support We try to keep the issue tracker reserved for bugs and feature developments.
When you do please make sure to provide enough information to fully reproduce the problem. with your whole environment.
I've built the "sensor_msgs" module from source and installed it with the following command:
catkin_make_isolated --install --pkg sensor_msgs
It works perfectly fine with other packages from the "common_msgs" repository (like "geometry_msgs" etc). But the "sensor_msgs" module wasn't recognized by Python. I got this error:
All the "common_msgs" packages were installed to the same directory, so I checked what is the difference between "sensor_msgs" and "geometry_msgs" (the last one worked fine).
The "geometry_msgs" has a single directory in my installation directory ("dist-packages"):
The "sensor_msgs" had 2 directories in "dist-packages":
Python only recognized the second directory (sensor_msgs-1.12.7-py2.7.egg), but this one didn't have any message files except the "point_cloud2".
I found a way to fix it for me: I removed the "catkin_python_setup()" line from "sensor_msgs/CMakeLists.txt" file and "<buildtool_depend condition="$ROS_PYTHON_VERSION..." lines from "sensor_msgs/package.xml" and then rebuilt it. I am not sure how and why, but this solved my issue. Maybe, this information will be useful for someone to fix it in the future.
After the fix, the "sensor_msgs" directory looks like this (and works fine):
My environment: ARM (32-bit) Debian GNU/Linux 9 ROS Melodic Python v2.7.13 sensor_msgs version: 1.12.7
Eugene