tum-traffic-dataset-dev-kit icon indicating copy to clipboard operation
tum-traffic-dataset-dev-kit copied to clipboard

module 'genpy' has no attribute 'Message'

Open PaulBigiel opened this issue 11 months ago • 1 comments

When trying to launch the conversion script to nuscenes, I get the following error:

(tum-traffic-dataset-dev-kit) paul@paul-B450NH:~/tum-traffic-dataset-dev-kit$ python src/label_conversion/conversion_openlabel_to_nuscenes.py --root-path r02_sequences_split \ --out-dir innuscenes Traceback (most recent call last): File "/home/paul/tum-traffic-dataset-dev-kit/src/label_conversion/conversion_openlabel_to_nuscenes.py", line 5, in from pypcd import pypcd # solution to correctly installing this :https://github.com/dimatura/pypcd/issues/28 File "/home/paul/miniconda3/envs/tum-traffic-dataset-dev-kit/lib/python3.9/site-packages/pypcd/pypcd.py", line 20, in from sensor_msgs.msg import PointField File "/home/paul/miniconda3/envs/tum-traffic-dataset-dev-kit/lib/python3.9/site-packages/sensor_msgs/msg/init.py", line 1, in from ._BatteryState import * File "/home/paul/miniconda3/envs/tum-traffic-dataset-dev-kit/lib/python3.9/site-packages/sensor_msgs/msg/_BatteryState.py", line 8, in import std_msgs.msg File "/home/paul/miniconda3/envs/tum-traffic-dataset-dev-kit/lib/python3.9/site-packages/std_msgs/msg/init.py", line 1, in from ._Bool import * File "/home/paul/miniconda3/envs/tum-traffic-dataset-dev-kit/lib/python3.9/site-packages/std_msgs/msg/_Bool.py", line 9, in class Bool(genpy.Message): AttributeError: module 'genpy' has no attribute 'Message'

Could it be that the conda installs a wrong version of genpy?

PaulBigiel avatar Mar 12 '24 12:03 PaulBigiel

It's caused by wrong version of std_msgs. You do not need to install genpy, this will only cause more mess. You can fix it by install the ros-sensor-msgs:

conda install conda-forge::ros-sensor-msgs

You can try the dockerfile I wrote, I just pulled a resquest, you can check it https://github.com/tum-traffic-dataset/tum-traffic-dataset-dev-kit/pull/10.

Mike-7777777 avatar May 02 '24 18:05 Mike-7777777