jmscslgroup / bagpy

Python package for reading, and extracting data from rosbag files and performing any analysis on it.
https://jmscslgroup.github.io/bagpy/
Other
207 stars 39 forks source link

When I run bagpy code in the termianl after running 'python3' it works perfectly. however when I run the code in pycharm and then press run. I get this error. #17

Closed SharyatSB closed 2 years ago

SharyatSB commented 2 years ago

Traceback (most recent call last): File "/home/sharyat/training_data/trial.py", line 1, in import bagpy File "/home/sharyat/.local/lib/python3.8/site-packages/bagpy/init.py", line 6, in from .bagreader import bagreader File "/home/sharyat/.local/lib/python3.8/site-packages/bagpy/bagreader.py", line 42, in from geometry_msgs.msg import Twist, Pose, PoseStamped ModuleNotFoundError: No module named 'geometry_msgs'

rahulbhadani commented 2 years ago

I do not use PyCharm and I do not know how the python environment is configured in PyCharm. But if it works with python in the terminal, then the installation is correct. For generic questions related to PyCharm, please refer to Stackoverflow.

SharyatSB commented 2 years ago

Alright thank you! I think I need to configure a virtual env in pycharm cause that is what I did in my terminal.

I had another question and I am sorry cause it is off topic, do you have any suggestions regarding labelling data for a ML model? I was able to label the images in my bag file by extracting the frames however I am not sure how to label the IMU data. Can I use bagpy for the above?

rahulbhadani commented 2 years ago

bagpy only decodes .bag files to .csv . There is no other features of bagpy at the moment.