Servers by jDrones

Should skidsteer rover's pivot turns turn wheels in opposite directions in order to rotate on the spot?

(Christopher Milner) #1

If this information is elsewhere, I’m sorry. Rover 3.5.1 on Pixhawk 4 with an Ardusimple. Skid steer, 2 drive wheels driven by a Roboclaw 2x30. The third wheel, in front, is free-castering.

Happy to upload a logfile but really this question is about the intended/designed behavior of the autopilot.

When my rover navigates a course it does its 90 degree pivot turns by stopping, then turning the outside wheel forward (i.e. left wheel forward to make a right turn) and leaving the inside wheel stationary, and rotating 90 degrees. Is this by design, or, should the inside wheel turn backward while the outside wheel turns forward, causing the rover to pivot on the spot? Not to nitpick but pivoting with only the outside wheel and leaving the other wheel stationary causes the vehicle to navigate in an arc, whose radius is 1/2 the distance between the 2 drive wheels (on my vehicle distance between wheels is 1 meter, hence arc radius is 0.5 meter). On a 90 degree turn, this arc seems to leave the rover about 0.5 meters off of the intended line to the next waypoint (in the right turn example, after a 90 degree right turn, the vehicle seems to be about 0.5 meters to the left of the line to the next waypoint, and when it subsequently starts driving along that line, it swerves to get back on to that line) If the vehicle were to turn on the spot using both forward and backward wheel motion then it wouldn’t be off the line to the next waypoint and it might leave the pivot point in a straighter direction.

Bottom line, my question is, whether the rover should be pivoting using both forward and backward wheel motion? If so then I must have a config wrong somewhere. @rmackay9?

Thanks in advance-

(Jeffrey Berezin) #2

Set parameter TURN_RADIUS to 0.1 meters. I just tried this and it worked for me as I was having the same issue.

I also would expect the rover to backup when I pull back on throttle left, but the rover doesn’t move. I want to be able to backup in a straight line to engage a trailer but it doesn’t seem to be supported.

(rmackay9) #3

@Christopher_Milner, yes, I think it should use both wheels to turn on the spot. A possibly interesting test might be to create a simple back and forth mission (i.e. 180 degree turn) and see how it behaves. Also perhaps try starting the mission with the vehicle facing away from the waypoint. I think the vehicle should turn on the spot and both wheels should move.

What may be happening is that the pivot turns during missions are not precisely: vehicle stops, turns and then the vehicle accelerates to the next waypoint. Instead once the vehicle comes within WP_RADIUS of the waypoint it starts slowing down and also starts turning towards the next waypoint.

I suspect if a delay of 1 second (the first field on the mission command) is put on the waypoint it might do what you want although I haven’t tested this.

(Christopher Milner) #4

Thanks @rmackay9 and @Jeffrey_Berezin!

On this screen http://ardupilot.org/rover/docs/rover-motor-and-servo-configuration.html in the Skid Steering section I think I see the ThrottleLeft and ThrottleRight servos having a range of 1100 to 1900 with 1500 being in the middle. Would you expect that to mean that the autopilot should output (to the motor controller) 1500 for no rotation, and 1100 for backward and 1900 for forward on each wheel?

(rmackay9) #5

@Christopher_Milner, yes, although often one (or both) of the motor outputs needs to be reversed (i.e. SERVOx_REVERSED=1) in which case the outputs will be 1900 for full back and 1100 for full forward.

(Christopher Milner) #6

All set and working now. Thanks. ThrottleLeft and ThrottleRight servos are set as in that screen. I monkeyed with the roboclaw pwm sub-mode so it now recognizes 1100 - 1500 - 1900 for reverse - still - forward. Rover pivots in place.

1 Like
(Christopher Milner) #7

Video showing pivot in place: https://photos.app.goo.gl/rrNTHjFD2JTFJ7Kt6 @ktrussell @rmackay9.

3 Likes
(rmackay9) #8

Yes, that’s looking really good. nice!

(Jeffrey Berezin) #9

additional point: when driving my rover in the yard yesterday the backup feature worked fine. I am not sure why it would not work for me when I had the rovers wheels elevated for bench testing.

1 Like
(Kenny Trussell) #10

That is awesome-looking control. I have been anxious to see if mine turns on a dime like that if I do some tuning since I now have fast servos, but unfortunately, I let the magic smoke out of a little Arduino Nano I use as a safety co-processor (shorted a wire). I haven’t had time to replace it yet. :frowning: Thanks for sharing your experiences!