Quantcast
Viewing all articles
Browse latest Browse all 293

Problem with servo360 library

I have a bot driving around using the 360 feedback servos. Using abdrive360 with just drive_speed to move/turn and stop. I am using simpleIDE with the latest Learn folder libraries, but the same thing happens in BlocklyProp (since it uses the same libraries).

If the bot gets stuck against a wall while going forward (or backward) such that the wheels can not turn, then the servo360 code gets stuck constantly trying to turn the servos. Even if you do drive_speed(0,0), it just ignores that. No other drive_speed() calls will work. In order to get things unstuck you have to pickup the bot so the wheels can turn, and they will turn a bunch in the direction it was going when it got stuck. I've tried a bunch of different things to resolve this, including turning feedback off and back on, disabling and enabling the servos, and using servo360_getAngle followed by servo360_angle to make it stop trying to go. The angle functions sort of work to stop the problem, but after calling them (even once) the drive_speed calls become erratic and odd.

I looked over the abdrive360 and servo360 code a bunch and there doesn't appear to be any way for me to resolve this without changing the library code.

Also, there is no way that I could find to reset/disconnect the servos once you have called drive_init/Servo360_connect functions. I thought maybe I could detect that the bot is stuck and then reset things, but that's not an option either...

Any help on this would be greatly appreciated!

Thanks!

Viewing all articles
Browse latest Browse all 293

Trending Articles