Closed robotsir closed 5 years ago
OK, I found the bug. In broadcastOdometryAndRunMotors.h, change uint8_t dhb10_ticksLeft, dhb10_ticksRight... to int64_t ..., since the encoder value can be +/- and way beyond 255
Yay, bug fixes!!
I'll try to update the code this weekend with your fix, or you can send me a pull request if you want credit on github. :)
Hi,
I was testing with ~/catkin_ws/src/ArloBot/scripts/PropellerSerialTest.sh, and I noticed that when I moved the robot forward with keyboard, the heading number increased from 0 to 2.0 very quickly, then it overflew and jumped back to 0. I would expect the heading to maintain around 0, since the robot moved forward, without any turning. Also, is the unit here in radians? if so, shouldn't it overflow when it reaches pi*2? I also saw "Received ERROR: GOSPD: previous ... new ..." every time when I pressed the keyboard, is that normal?
In Rviz, when I drove the robot forward, the robot actually turned, and suddenly jumped to a new location when overflow happened.
I confirmed that my encoders were working properly with: https://learn.parallax.com/tutorials/robot/arlo/arlo-activity-board-brain/control-arlo-simpleide-terminal. Any ideas?
Thanks!