rohanmeserve / dsc190_imu_oakd

0 stars 1 forks source link

PositionEstimator.run() takes 6 positional arguments but 9 were given #1

Open Michelangelo-Y opened 3 months ago

Michelangelo-Y commented 3 months ago

starting main imu set estimator set failed to read imu!! Traceback (most recent call last): File "/home/mvd/Projects/SLAM/dsc190_imu_oakd-main/ImuPositionAdjustment.py", line 133, in data = est.run(imu_data[0], imu_data[1], imu_data[2], imu_data[3], imu_data[4], imu_data[5], 0, 0) TypeError: PositionEstimator.run() takes 6 positional arguments but 9 were given

rohanmeserve commented 3 months ago

Greetings,

This repo was one of a few that I put together while working on a project for school; while I am no longer actively working on the PositionEstimator (or any other donkeycar-related work), the final version can be found in this repo: https://github.com/rohanmeserve/donkeycar/blob/main/donkeycar/parts/pos_estimator.py

I would note that there is no __main__ function in the final version, as it was intended to run as a part within the donkey drive loop. Additionally, the imu file used here is also an older version; the updated one is here: https://github.com/rohanmeserve/donkeycar/blob/main/donkeycar/parts/imu.py

I'm used to leaving my school-related repos as private, so it slipped my mind that someone might want to use this code - sorry for any confusion.

I see that you are working with a system other than donkeycar - it may take a bit of work to adapt the PositionEstimator and IMU parts, but I believe they will work on their own.

Finally, I would also like to point out that the PositionEstimator is intended to run with a gps; the last 2 inputs for the .run function are supposed to be pos_x and posy; these were set to 0 in \_main__ for troubleshooting purposes, but are essential for getting actually useful info out of the estimator.

I wish you luck with your coding. I will keep this repo up just in case there's anything useful inside it, but for the most part, please refer to my donkeycar fork for the (mostly functioning) final versions of my code: https://github.com/rohanmeserve/donkeycar/branches