Servers by jDrones

RC Override in Mavlink

I apologize if this has been answered elsewhere, but … If I have an RC radio connected and issue the MAVLINK command RC Override followed by values (ex. 1500 1500 1500 1500), does this prevent any more input from the R/C radio and “lock” the values of the first 4 channels to 1500?

As a test, I issued the over-ride command (via Mavlink) to the FC, and it didn’t seem to affect the R/C input “sliders” when I view them in the Initial Setup screen of MP.

Am I wrong in how it works, or did I possibly issue the command incorrectly? Or something else?

I’ll check the code. I’,m in hospital so it may be a day or two.

Did you ever figure this out? I have a companion computer that sits between the telemetry radio and the PixHawk. The system also incorporates a radar unit. Note that I’m also using a standard R/C controller (2.4Ghz) connected to the PixHawk. The companion computer checks the flight MODE, and if it is in STABILIZE MODE and the radar detects an object, I want the input from the R/C controller to be ignored and the MODE changed to BRAKE, then after 4 seconds, I change the MODE to LOITER, and after 10 seconds, back to STABILIZE. The idea is that if an object is encountered, the quad will first STOP, and then wait, then allow the pilot to route the quad around the obstacle.

I have this mostly working - but there are still some things that I need to fix, and I need more information before I proceed.

  1. Currently, when I change the MODE to BRAKE, and then to LOITER, I continuously send the MODE information to the FC at a 1 Hz rate, so that the hand-held R/C controller doesn’t regain control. Is that necessary? Is that the right way to do this? I would like the hand-held R/C controller to be able to send a RTL, LAND or DISARM command and have that acted upon immediately, but is that even possible?

  2. I want to do something similar when in AUTO mode. When an object is detected, I want to change the MODE to BRAKE for 4 seconds, then to LOITER, and then raise the throttle to 1750uSec and the roll to 1600 uSec. This should make the quad move up and to the right. When the object is no longer sensed, I want to change the throttle to 1500 (level flight), the Roll to 1500 (straight ahead), the PITCH to 1600 (forward slowly). If no object is detected for 15 seconds, the mode is changed back to AUTO.
    In this mode I want the FC to ALWAYS respond to RTL, LAND and disarm.

I have some of this working, but want to finalize it, but I need some help in understanding what the FC is expecting and what it will do in all cases. I’m trying to avoid processing the PPM input as well as handling all the Mavlink stuff. My companion computer is a TEENSY 3.5 running at 120MHz.

I think this RC_OVERRIDE is the worst way to implement object avoidance.

1st check latest dev code, there are lots of changes coming in thew 3.7 release including object avoidance.
2nd you can control the movement of your copter in meters in guided mode, so instead of blindly pulling rcin values why not switch to guided mode and tell the copter to go X direction by Y meters…

3rd Why stabilize mode ?

My problem is that - even though I have tried, I have never been able to compile PixHawk code.

And I’m not familiar enough with the basic scheme of the Object Avoidance code - like how it is supposed to work? I have been too busy to read and understand what is being worked on.

And I “hand-fly” in Stabilize mode most of the time. If I take my eye of the FPV screen for a second, and an object is in the way, I want it to stop so I can bring it home safely.

Currently even with 3.6 if you put a sensor or sensors on and enable object avoidance, the copter will stop at obstacles. First try read this : http://ardupilot.org/copter/docs/copter-object-avoidance.html

I didn’t realize this. Thanks!

Since I can’t compile PixHawk, I’ll have to use the TEENSY to translate between my radar unit and something that looks like the LightWare or TerraRanger. But my goal is to have something that works in STABILIZE and AUTO modes as well. I have described to many how I would like AUTO mode to work:

  1. Detect Object
  2. Stop (brake)
  3. Fly mostly upward and slightly to the right for 15 seconds
  4. If Object clears, continue on up-and-right for 4 more seconds. If it doesn’t clear in 15 sec, issue RTL.
  5. If it DOES clear in 15 seconds, Fly forward slowly for 10 seconds. If object re-appears, go to step 2.
  6. If object does not re-appear switch back to AUTO MODE and continue mission.

I’m using a good radar and I can detect “hard” objects (buildings) 180’ away, “soft” objects (trees) about 60’ away, and sloped ground (mountains) about 40’ away. I turn on Object Avoidance only when the FC reports that I’m over 8 meters in the air in order to avoid ground reflections at low altitudes, and I have my radar tilted upward at 15 degrees, so the 35 X 35 degree pattern it is closer to horizontal when I’m flying forward.

Does the current plan involve doing anything like this?

As I read in the code, it does even better.
Using different pathfinding algorithms (Bendy Ruler, Dijktsra) to plan a route between dynamic fences, exclusion and inclusion zones and objects detected by proximity sensors…
I think it is worth wait. Beta will be released very soon.

Servers by jDrones