tum-traffic-dataset / tum-traffic-dataset-dev-kit

TUM Traffic Dataset Development Kit
https://innovation-mobility.com/tumtraf-dataset
MIT License
38 stars 7 forks source link

module 'genpy' has no attribute 'Message' #8

Open PaulBigiel opened 4 months ago

PaulBigiel commented 4 months ago

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?

Mike-7777777 commented 2 months ago

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.