Servers by jDrones

L1 navigation for tradheli

(Chris Olson) #12

Pixhawk1 is added. The fmuv2 build should work for Pixhawk boards that do not have the flash bug.


For all other commands in your mission plan, it will smoothly transition to/from copter navigation controller. In the vertical axis, it still uses the copter position controller and performs linear altitude changes between way-points

Starting a video mission with L1 navigation than change to Region Of Interest.
I wonder if I can incorporate a portion of ROI in a mission for my video projects, flying side-wards and backwards and will it transition to forward and back to L1 navigation to finish the mission.
I think I will try it when I feel comfortable.
In the past I have used for videoing the flight mode Drift which does very nice automatic coordinated turns. But it is a bit odd to fly with the TX.

(Bill Geyer) #14

I think this point should be bolded and underlined because it’s very important. Unlike copter NAV where you typically would set your waypoint radius really small to ensure the aircraft went through the waypoint, you want to make your waypoint radius larger in L1 navigation in order for it provide a smooth turn to the next course. Otherwise you’ll end up with the aircraft flying through the way point and tear dropping into the next course.

(Bill Geyer) #15

I don’t think this will work. While conducting L1 nav the L1 controller has complete control over yaw and thus the copter region of interest inputs for yaw will be ignored. You could switch to spline way points which would invoke the copter navigation and that would allow the region of interest feature to work normally.

Please DO NOT change the WPNAV_USE_L1 parameter in flight. That will have unexpected results.

(Chris Olson) #16

Yes, I tested this in flight and it works. If you plan a mission with regular waypoints running L1, but insert spline, it will switch seamlessly from L1 to Copter Nav when it hits the spline waypoints. At the point where you have the splines you could insert a ROI and it should work. I didn’t test that. But since I know it switches to Copter Nav I’m reasonably sure it will work.

In my test, as soon as it got past the splines it went back to L1 and it was smooth. It just sped up and went back to what it was doing before. I thought it might actually fly a spline on L1, as the first versions of this did. But the final version simply slows smoothly to the Copter Nav and does what any multicopter would do on a spline.

1 Like
(Chris Olson) #17

This is a good point too. L1 will not work with WP radius set to 2 meters or 5 meters, or whatever people use for Copter. Depending on the speed, it may or may not use the full radius to make a smooth turn. I’ve been flying it with the WPNAV_RADIUS set to 2200 (22 meters), tuned for flying tight 180 deg turns on surveys at 20kts. At 10kts it will turn an almost square corner much closer to the waypoint with smaller radius. At 30kts it will fly a wider “teardrop” with more crosstrack error.

So this can be tuned for your normal cruise speed. But it will handle a wide range of speeds and still keep the bank angle in check with the turn rate (or turning period), and still maintain constant speed in the turn.

I found that the damping setting, lower values will cause more “teardrop” and crosstrack error on the next leg. Higher damping causes less “teardrop” and cross-track error. I had the damping at 1.3 at one point to get zero crosstrack error. But turned that down to 0.8 and found Stomp Factor and the associated pedal turn works actually better for 180 deg S&R turns.

Stomp Factor is one thing Plane L1 does not have. But pedal turning is a perfectly valid method of making tight turns with helicopters, within the airspeed limitations in the flight manual for pedal turns. And it works just as well in RC as it does in full-size manned.

This is a good video that depicts the dynamics of the S&R reversal using a pedal turn. A helicopter can literally turn on a dime using this method. ArduPilot is now capable of doing this with L1 on autopilot if you get it tuned right with Stomp Factor.

1 Like
(StefT) #18

@ChrisOlson. I can confirm that the behaviour is different between normal waypoints and spline. In my 1st test, I used spline and did not see a change. I first thought that I had not set it up correctly but as soon as I used normal waypoints the changes were dramatic and L1 was active. I still have to do a number of tests as my radius is much wider than anticipated. I originally soften the WP behaviour a lot to get smoother results but the pedal turn is a way smoother option and I would like to see if I can get the same results from your suggestions above.

If this may help some else, setting WPNAV_USE_L1_NAV = 1 activates the L1 controller.

(Chris Olson) #19

That’s correct. It won’t work with spline. Even if L1 is enabled it still will revert to Copter Nav if it encounters spline. It will, however, switch smoothly back and forth in flight if you insert spline in middle of a regular waypoint flight flying L1.

The turning period, damping and Stomp Factor will affect this. What I would do is set the WP radius for the typical speed you fly. I don’t know if you’re flying gas or electric, I think you have gas. So set up a flight plan in the shape of a big figure 8 and put a DO_JUMP command in it continuously repeat. It might take an hour to get it tuned to perfection the way you like.

Set up your Channel 6 knob to adjust the WPNAV_SPEED and set the tune low and tune high to the minimum and maximum speeds you’d like to see. Take off and start flying the flight and turn your knob up until it is cruising at your desired cruise speed.

For now, leave the damping at 0.8 to 0.85. I don’t think you’ll find it necessary to adjust this.

Start with the period at 20. Reduce the period one at a time and you should start to see the helicopter turning BEFORE it gets to the waypoint initiating the turn, it should fly in a teardrop fashion with crosstrack error to the outside of the leg of the flight to the next waypoint. If the waypoints are sufficient distance the crosstrack error should reduce and the helicopter’s flight path will intercept the radial to the next waypoint.

If you get the period too low it will bank quickly - it banks more aggressive with lower period.

Now, when you get it banking the way you want try some manual pedal turn and see how much it takes to get zero crosstrack error as it makes the turn. Important to do this in both left and right turns because of torque based on your rotor turning direction makes bank angle steeper turning one way than the other.

Now, when you get the “touch” on the pedal turn and see it works good set the Stomp Factor to try to simulate it with the autopilot. Bill said to only adjust the Stomp Factor by .05 at a time. But I found here that adjusting it by 0.1 at a time provides a more reasonable adjustment.

Stomp Factor (pedal turning) is best used on 180 deg S&R reversals. That’s where it has the most desirable effect. It has a negative effect on a 90 deg turn at speed.

If you do not fly flights with 180 degree turns then adjust the damping instead to eliminate the crosstrack error and maybe put in a small amount of Stomp Factor like 1.1.

That’s basically how I tuned it here. The first versions of the code I tested did not have Stomp Factor. Bill put that in later so I could pedal turn it. But it is kind of a nice feature.

(Bill Geyer) #20

Just a note here that you can use do_change_speed commands in your mission plan to change speeds as well. The aircraft will smoothly accelerate/decelerate to the new speed based on your wpnav_accel param.

A little explanation on the directional control logic that is used with the L1 controller. Unlike Planes where more of the natural directional stability (tail follows the nose) is used to aid in coordinating the turn, copter always has control over the tail and unless some (pilot/autopilot) is telling it to yaw the aircraft, it always holds the heading. So with L1, I had to determine the yaw rate at which to swing the nose to provide a coordinated turn. The calculated yaw rate is just based on the bank angle and assumes a level turn. The turn scale factor, or Stomp Factor as Chris likes to call it, allows the user to put more or less pedal in turns in case the calculated value is not enough to keep the turn coordinated.

Hope that helps.

(Chris Olson) #21

I have updated the L1Nav build to the latest Copter 3.6.9 and added NuttX builds for all the various Pixhawks and Pixracer

The firmware is here ->

(Patrick K) #22

Wohoo looks interesting. Can’t wait to test it.

Does it combine with the 4 servo swash plate firmware?

(Chris Olson) #23

@Pakman as of this morning the L1 Navigation feature is available with four-servo swashplate support. Follow the link above.

This is built on Copter 3.6.9, so please pay attention to the “watchdog” stuff, the bad IMU support for Pixhawk Cubes, etc. that was dumped into what was supposed to be a stable release after Copter 3.6.7. Personal experience with this new in-flight rebooting of your controller with ChibiOS says it is not a real impressive “feature” in Copter 3.6.9.

There is both NuttX and ChibiOS builds available - NuttX does not have the “watchdog”.

The L1 Nav support will soon be in ArduHeli-stable, which is built on Copter 3.6.7, as soon as I get it merged.

1 Like
(Patrick K) #24

thanks for this quick support.
so should I better start testing with the Nuttx release? (I am still using profiCNC CubeBlack on my testbench)

btw: will the ArduHeli-stable release also support 4 servo swash plate?

(Chris Olson) #25

It’s not planned at this time because there was a significant backport for 3.6 four-servo support, and the swash setup breaks the current Heli setup page in QGroundControl due to parameters that appear and disappear based on swash selection.

For stable release for commercial operators we need the heli setup page to work.

(Igor Ivanovic) #26

Does this mean we will finally have ArduHeli as a standalone branch without all the copter nonsense?

(Patrick K) #27

I did some test flight with 3.6-L1 today in 550sport goblin.
The navL1 works awesome.
It flew 30m/s like a charm. See some overshoots but tuning is not finished.

I was confused: the tuning knob seems not to actualize when refreshing parameters. But it reacts accordingly (wp nav speed is tuned from 0 to 30m/s)

(Bill Geyer) #28

Glad to get some feedback on L1. I hadn’t done much tuning either and I have noticed an initial overshoot on speed. After it locks in, i didn’t see any big transients but I only tested it at 15 m/s.
Please post your settings once you get it tuned to your satisfaction. As for the update of the wpnav speed, I will have to look at that. I am guessing the parameters updated when you did this with copter nav. I’m not sure what would be different to keep it from updating the wpnav speed.

(Chris Olson) #29

WPNAV_SPEED will not update on-the-fly in your GCS. The parameter list has to be refreshed every time it changes. MavLink does not do this on-the-fly.

The ArduHeli builds are already there so we can fly new features on the current stable code, while being independent of what Copter does. The ArduHeli concept was something I dreamed up a couple years ago, as we have complete control of what goes into it for new features we have developed and tested. It is what makes it possible to fly new things like the governor, L1 Nav or the Vbar acro on Copter 3.6 without having to worry about when the next major release is coming out that will have these features. And worrying about how many bugs is in the new Copter release, that are totally not related to heli, in order for users to fly these new features.

ArduHeli is called a “fork” of Copter that is specific to helicopters. All open source projects develop forks with time, such as Ubuntu linux being a fork of Debian.

(Patrick K) #30

Blockquote WPNAV_SPEED will not update on-the-fly in your GCS. The parameter list has to be refreshed every time it changes. MavLink does not do this on-the-fly.

well I did see the changes in the previous version (3.6.6 4-servo swash plate). I hit the button tools/refresh, took some time, but afterwards the changed wpnav speed was visible…

qgroundcontrol AND missionplanner…

for test results:
I did figure-8 runs. first accu with L1 deactivated for plausibility checks, and to reapply some parameter settings.
then L1 activated and I was completely excited.

unfortunately I had no internet access and no notes with me… so I was completely blind while “tuning” parameters… or lets say I was changing parameters and observing behavior…

EDIT: the firmware was “ArduHeli-3.6-L1Nav-CubeBlack”

(Chris Olson) #31

Very good. We have rain here today so working on the next version of the heli setup in QGC. I need to fix some things we did in a couple commits that make the heli setup not work. But after I get that fixed I’m going to see if I can get the L1 tuning settings incorporated into the heli setup in QGC.

The reason I want to do this is because L1 is specific to helicopters - it is not implemented for multi’s. So one difference between Plane and Heli is that Heli has the capability to fly a wide variety of speeds on L1 Navigation. Planes are more limited because they eventually stall and fall out of the air if you slow them too much. So right now, I have my L1 tuned for flying 20kt survey flights. But I might want to load in a flight plan for a 50kt long-range flight and this takes different tuning for the turns. Having these settings handy in the heli setup will allow click, click change the settings where it’s handy, and bingo - she’s set up to fly my 50kt flight.

So I think we can get a L1 Navigation tuning category in the heli setup in QGC that will make this very simple to do (after I get the rest of things fixed up so it’s compatible with the heli setup). @DonLakeFlyer and @luisvale were very helpful in getting us that first heli setup in QGC. Now we want to make it awesome so this can be done from your mobile phone or tablet on-the-fly in the field with no hassles.