Folks, here is what I want to do: an autonomously driven snowmobile. I have the mechanical parts working well for the directional control (I can turn the handlebar left and right with the linear motor - I hope you can see it in the picture). The throttle also works, though not shown in this picture. What I would like to do is use the APM board to control this, to give the snowmobile a set of waypoints to navigate to, and then return.
The purpose is to drive the snowmobile in a grid to measure properties of the snow and ice (the picture is from Antarctica) - and to free up a scientist from driving in a grid for hours.
Right now I control the snowmobile over a radio - manually turning left or right - not very satisfying.
- The steering is controlled by an H-bridge that puts either +12V or -12V on the motor to extend or retract it. When there is 0V on the lines, the motor doesn't move. (I use a 500Hz 50% duty cycle PWM wave to control the speed at which the arm moves).
- The throttle is a PWM servo motor (1ms for zero throttle, 2ms for full throttle).
I imagine the latter of these (the throttle) should integrate easily with the APM board. How to drive the steering from the APM board? Do I need to have an interface board between the APM and my H-bridge?
Doable? A lot of hacking of the code? I don't know Arduino, though it looks relatively straightforward. I am using a propeller (www.parallax.com) to communicate with the radio, to read the GPS, and to drive the steering and throttle.
(right now the GPS is ignored, but hopefully with APM board it can be used to control the steering).
I'm new to this community (wish I had stumbled on this about a year ago!!)
@Linus: How does the code deal with turning radius of the vehicle? Because of the skis and the throw of the linear motor, I can't make sharp turns. Or do I deal with that in the ordering/positioning of the waypoints and put the waypoints "outside" the grid that I really want?
@TCIII - I think I can use my existing board to interpret the PWM from the APM into the proper drive for the H-bridge.
@KM6VV - GPS is great, compass needs the declination (can be anything up to 180degrees! - in other words North is thataway and Magnetic North is... exactly the other way!!)
I think I'd steer around the waypoints, (maybe use a couple) allowing for the turning radius.
Yeah, I'd heard about the usefulness of a compass down there!
The present code makes really sharp right angle turns whether you are using skid steering or standard front wheel steering. I know because I have both kinds of rovers and have tested the code recently.
the rover currently does not account the turning radius of the vehicle.
the apmrover for now is primarily used for much smaller projects and i can unfortunately not help so much with code because im just a aspiring junior developer for now.
were actually lacking people jumping in.
one thing you can do is tune the NAV_ROLL_P to adjust steering behavior according your vehicle and setup your waypoints for larger turns manually.
it also depends on the speed you want to go and how large the grid is.
I could not find a definition of the NAV_ROLL_P in the ardupilot-mega APM_Parameters. Could you point me to where it is defined.
Thanks for the info, much appreciated.
How about the Rover Turn Gain? I am tempted to experiment with this value. Is there a definition as to what this parameter affects concerning turning?
ROV_GAIN need to be set to about 5 so as to increase the gain of the wheels servo.
i had lowered it to 4 and got no moving servos anymore and took the NAV_ROLL_P instead.
another thing you probably can try the ROV_AWPR_NAV function from Jean Louis Naudins 2.20 release but im not realy aware how this works.
gave it a try once and programmed a simple rectangle course. could get my rover running much faster but it would drive in circles instead making sharp turns on the waypoints.
dont be confused, the shown waypoints dont match up with the programmed course.
Linus - thanks. I looked in the code and there does seem to be a provision for limiting the turn radius, so I think almost everything I need is in the code...
I think that three Sharp IR sensors, one looking forward and two at 45 degree angles to the front will be sufficient based on my MINDS-i Parallax PING sensor experiments. The three IR sensors can be read by the Atmel 2560 Analog A0, A1, and A2 their detection indications used by the code to steer right or left. Couldn't be more simple. I think that you are making your obstacle detection overly complex in relation to what is required for effective obstacle avoidance.
Just a thought.