BNO055 IMU integration #76
Replies: 2 comments 5 replies
-
I just discovered that current Teensy code doesn't run at all. It stops immediately with "Emergency STOP" and "IMU failed to initialize. Check your IMU connection". This is because the Teensy current 'scripts/base_controller/src/main.cpp' logic checks if the IMU is initialized but the code to actually initialize it is commented-out/missing. |
Beta Was this translation helpful? Give feedback.
-
Hi @joeuser846 let me clarify the software architecture of diffbot first. There are currently two approaches where the PID controllers for the two motors are located:
The first approach (high-level PID) was the one I implemented first, with just a simple ecnoders.ino running on the mcu. This has the benefit that you can tune the high-level PIDs through ROS' dynamic reconfigure. You can find more about it here in the documentation, including a video. The second approach (low-level PID) was the one I introduced later. It uses the main.cpp and libs in It is not so nice that I put basically two different approaches in the @Russ76 built on the high-level approach and kindly added the IMU into a separate encoders-bno.ino script (beside the original encoders.ino) you can flash onto the teensy mcu. So the scripts folder is also split into using either the scripts in
Hope this makes it a bit clearer because I agree that this can be really confusing to new users. Otherwise please let me know. After adding some unit test, I plan to refactor the hardware interface because it is not clear for new users that there are basically two interfaces (two publishers in the write method) available. The refactoring would consist of adding two methods that distinguish between the two approaches and then call either or in the |
Beta Was this translation helpful? Give feedback.
-
fjp recently merged a PR from Russ76 that adds the file "encoders-bno.ino" but there seem to be no changes to the SBC or Teensy code to include or reference it. Is there a suggested way to integrate this IMU code?
Any guidance is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions