ori-drs / allan_variance_ros

ROS compatible tool to generate Allan Deviation plots
BSD 3-Clause "New" or "Revised" License
477 stars 87 forks source link

ValueError with cookbag.py and analysis.py #22

Closed MagdaZal closed 2 years ago

MagdaZal commented 2 years ago
> magda@magda-VirtualBox:~$ cd catkin_ws
> magda@magda-VirtualBox:~/catkin_ws$ source devel/setup.bash
> magda@magda-VirtualBox:~/catkin_ws$ rosrun allan_variance_ros cookbag.py --input /home/magda/catkin_ws/src/allan_variance_ros/2022-08-12-12-14-04.bag --output cooked_rosbag
> Failed to load Python extension for LZ4 support. LZ4 compression will not be available.
> Traceback (most recent call last):
>   File "/home/magda/catkin_ws/src/allan_variance_ros/scripts/cookbag.py", line 14, in <module>
>     with rosbag.Bag(args.output, 'w', compression='lz4') as outbag:
>   File "/opt/ros/melodic/lib/python2.7/dist-packages/rosbag/bag.py", line 445, in __init__
>     raise ValueError('compression must be one of: %s' % ', '.join(allowed_compressions))  
> **ValueError: compression must be one of: none, bz2**

> rosrun allan_variance_ros allan_variance /home/magda/catkin_ws/src/allan_variance_ros/ /home/magda/catkin_ws/src/allan_variance_ros/config/ellipse.yaml

Do you know where is the problem? Thank you very much for the answer

mahammadirfan commented 2 years ago

Hi, I am getting the same error. Have you found any solution ?

THanks!

MagdaZal commented 2 years ago

@mahammadirfan Unfortunately not, I am still looking for the answer

MagdaZal commented 2 years ago

@mahammadirfan Write in terminal chmod gu+x cookbag.py and then path to cookbag rosrun allan_variance_ros cookbag.py --input original_rosbag --output cooked_rosbag. It solves the first problem but in my case the .csv file still has values of 0 and Nans and I dont know why

mahammadirfan commented 2 years ago

Hey, its working here, make sure you have right IMU rostopic, IMU update rate in your yml file, analysis.py file. I edited this and got the results.

MagdaZal commented 2 years ago

Hi @mahammadirfan, Thank you. I changed those files and it worked. I close this issue

radhasaraf commented 2 months ago

It's missing in the README, but analysis.py also takes a 'config' argument to which you can provide the config file (with the imu topic and rate). Then you don't have to change it manually.