Over time, the software switch ended up a real pain. That PLA detent mechanism seemed to work harden, get stuck all the time, & eventually break off from the force it took to release. It really needs a larger mechanism with a metal spring. Perhaps a 2nd pair of magnets could engage the switch in 2 positions. Either way, the next push was a way to drive in reverse.
Some testing with a reverse leash mode was promising. The trick is the mechanical angle sensor only goes up to 50 deg reliably. It basically tapers its maximum speed from 40 to 50 & then immediately goes to minimum speed reverse at 50. There's no practical angle where it goes forward at minimum speed. It's always slightly above minimum speed when going forward. It might be smarter to make it go to minimum speed at 40 deg instead of tapering.
It no longer runs away forward if you stand too far behind it in leash mode. It normally just backs up & stops. It now runs away in reverse if you stand beside it. If you get beside it, it tends to get stuck oscillating backward & forward. The oscillation makes it slowly turn away from the leash & end up staying pulled in reverse. It's arguably better than the case of running away forward, but not a perfect solution.
The best way to drive it is to pulse the leash instead of holding it in the sideways direction. The days of holding it to make it turn sharply in the forward direction are over though. It's unknown how disastrous the loss is. There could be a way to add hysteresis after it goes in reverse, whereby it stops below 50 & has to go back below 40 deg to go forward again.
It only turns when going forward. In reverse, the steering points in its configured direction towards the user with no feedback.
The trick with steering in reverse is all the use cases require it to go straight back. In all the use cases, steering would go off the path in reverse. They're all intersections where you're pressing a button & need to back up straight. Of course, it can't really back up straight without heading hold & that would be difficult. All the leash code has it directly turning the servo & there's a lag when turning the steering between forward & reverse. It's definitely more stable if it tries to turn towards the user when in reverse, but practical experience has shown that to be painful.
Definitely undecided on the hysteresis. All it does is reduce the flopping. With or without it, there's going to be a deadband where it's not going to move. It might do better with a delay. It's basically a summary of the limitations of an angle sensor with only 100 deg of angle range, .5m of distance resolution & lots of pendulum oscillation. An ideal sensor could do 360. It would have to go on top. UWB would do the job as an extra package on top of the leash.
lion mclionhead
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.