Developer

APMrover2 2.43 released

Tom and I have just released APMrover2 2.43 for your driving pleasure!

This is a major new release with a lot of improvements, especially in the area of more precise steering and navigation. Highlights include:

  • adoption of L1 navigation code from APM:Plane
  • new more precise steering controller
  • support for the new Pixhawk autopilot
  • conversion to centimetre level precision throughout the code

I'll only be able to give a rough summary of the changes here as we have had more than 1500 changes in total go into the git tree since the last release. Only some of those were related exclusively to the rover code, but a lot of them do affect rover.

The most significant change is in the navigation controller. Earlier this year the APM:Plane code adopted a new L1 navigation system. That was highly successful, and led to the fixed-wing plane code improving its navigation performance enormously, with much smoother and more accurate turns, and much better handling of wind, along with simpler tuning.

Since then Tom and I have been working to bring the same benefits to the Rover code. It was a bit of a rocky start, with initial attempts not working well on real rovers.With a single set of tuning values we were able to get good results either on straight driving or in tight turns, but not in both with the same settings.

We finally made progress when we wrote a new STEER2SRV steering controller that takes the output of the L1 navigation code (as a demanded lateral acceleration) and produces the steering controls. The new controller was based initially on the fixed-wing plane roll controller, but adapted to the physics of wheeled vehicles. That controller replaces the old classic PID based steering controller in the rover code, and provides much smoother and more adaptable steering. After we got the tuning for it right we are now delighted to report that steering on both of our rovers is now much better than it has been previously.

The new steering code has been so successful in fact that I have now ported it back for use in APM:Plane to control the ground steering on planes when taxiing and in automatic takeoff and landing. It has really helped with one of my planes that tends to be difficult to control during takeoff.So APM:Rover and APM:Plane now use the same ground steering code, just with different tuning parameters.

The next big change that you may notice in this release is the internal move to 32 bit integer positions instead of 32 bit floating point positions. The reason is that 32 bit floats that represent a global latitude/longitude only have a precision of a bit over 1 meter in some parts of the world. On a plane flying at 60 knots this isn't a problem, as 1m accuracy is great, but for a rover it is not good. Switching to 32 bit integers gives us a precision of about 1cm, which is a good level for a rover. This lowers the amount of weaving of the rover as it no longer tends to jump across 1m boundaries.

That change to 1cm accuracy had impacts in a lot of different parts of the code. For example, the code which takes account of GPS lag to predict the actual position of the rover needs to do its math carefully to avoid ending up with floating point rounding errors, and the NMEA GPS driver needed to be modified quite a lot to read the floating point numbers in the NMEA protocol in a way that preserves centimetre level precision.

The centimetre precision change don't mean that every rover will now navigate with cm precision. The rover will still be limited by the precision of its GPS and how good its steering linkages are, but if you have a good (expensive!) GPS and good hardware them APM:Rover should be able to get much better results with this release than it could previously.

Support for the new Pixhawk autopilot is another major feature of this release. Most of my testing for this release has been done with a Pixhawk and it has worked very well. We still support the APM1, APM2 and PX4 of course, it is just nice to also work with the latest hardware. We also are working on supporting APM:Rover on embedded Linux boards like the BeagleBone black, and Mike McCauley is working on a port to the Flymaple board.

For this release you will need to read the new navigation tuning guide for APM:Rover as quite a few parameters have changed. The full parameter list is also useful as a reference.

There have been a lot of other smaller changes in this release. Here is a partial list of the more important ones:

  • added new AP_BattMonitor library for common battery handling with copter and plane
  • use GPS projected position based on estimated GPS lag for more precise waypoint turns
  • changed STEERING more to allow for throttle nudging
  • added RCMAP support for mapping RC channels in any order
  • switched to using new AP_Scheduler scheduling
  • enabled RELAY support
  • added LEARN_CH parameter for setting which channel triggers waypoint learning
  • support camera stabilization and camera mount controls
  • adopted new AP_Notify system for controlling LEDs on different boards
  • lowered default accel/gyro filter frequency to cope with rough surfaces (eg. grass)

Tom and I wish you a lot of happy rovering with this release!

Cheers, Tridge

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • I have 6WD chassis without servo http://www.pololu.com/product/1562 there is anyway to tweak the code to run into these type of setup? any solution ?  im really interested to use APM in my project but currently i have to stick with 6WD chassis.

  • Is the compassmot setup feature disabled in APMrover ? I was going to do it like in copter but did not see it in CLI

    With all these high power lines it might be worth a try ?

  • Moderator

    Guys what is the cheapest apm unit to run this from? Im going to be putting a pixhawk in my quad but still want to run an autopilot on my ground rig.

  • Excellent work, made me build a rover based on a Maverick 4WD electric chassis. Works like a charm now - navigation precision almost down to centimeters. Used default params - NAVL1_Period now at 8, will next try to raise that since I have a minor snakeing still.

    However to get to this state I had to overcome a major snag. Built up the rover, loaded firmware, did all the setup and calibrations as per WIKI. First test runs: total fail, rover consistently heading 180 degrees away from any target, snaking at full steering servo deflection rate. Based upon experience with ArduCopters I triple-checked everything, calibrated mag dozens of time, disabled internal mag, swapped out known good external mag and GPS module from Copter - no luck

    Was about to give up on  it until I remembered the one strange sentence in the WIKI about reversing the Roll (?!) Input. At the time I stumbled across it and thought it was a remains from ArduPlane - did not make any sense to me. In sheer despair I clicked on it and BINGO - all fine now

    I think explaining that paramount detail a little more in depth in the WIKI would help newcomers a lot

  • Hi Andrew and Tom, This looks great,

    I have installed a link to this Discussion on the home APM:Rover page and I have added your navigation tuning guide to the Table of Contents for APMRover modifying the page slightly to be consistent with current format norms.

    If either of you you would like me to add anything else to the APMRover wiki, please let me know.

    I am a bit otherwise preccupied at the moment, but when I get a chance I will incorporate the modifications you have made in this and the previous update directly into the body of the APMRover wiki if you like.

    Thank You,

    Gary

  • T3

    Excellent! I'll have to give this a try.

  • Admin

    Hi All,

    Thanks for the kudos, much appreciated.

    I believe that this L1 code will be easier to tune than the original JLN code and its updates. Tridge has done a great job with the addition of his PID steering code which will help with rovers that have some slop in their steering linkages.

    The default values chosen for the NAV_PERIOD and the STEER2SRV_TCONST are based on my Traxxas Slash 2WD rover so please do not hesitate to experiment with those baseline values. Feedback on navigation performance will be greatly appreciated and we can begin to build a table of default navigation parameters for the various rovers that are presently available to the membership.

    Regards,

    TCIII ArduRover2 Developer

  • Developer

    Thanks for the great work, you guys rock! 

  • Developer

    im excited to try out the new release and like to thank you for your tireless development and testing work during my absence.

    Regards,
    Linus

  • Amazing work, thanks Tridge and Tom. Look forward to taking this for a spin!
This reply was deleted.