rodrigoenriquez / ardupilot-mega

Automatically exported from code.google.com/p/ardupilot-mega
0 stars 0 forks source link

RTL and Auto modes can't turn on. #363

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Switch APM to setup position (switch towards servo headers). Update 
firmware.  Open APM, connect, Go to CLI Terminal -> Setup -> reset. 
Reset APM board. Setup -> radio. That ok. Go to CLI Terminal -> Setup -> Modes. 
Set up six flight modes:
 Pos 0: Auto
 Pos 1: Stabilize
 Pos 2: FBW_A
 Pos 3: Loiter
 Pos 4: RTL
 Pos 5: Manual

2. Switch APM to Fly and reset. In APM Planner under "Autopilot Status", look 
at the current Mode.
Flick your mode switch on the transmitter.  Modes Manual, Stabilized, FBW_A, 
Loiter switch is normally.
When I switch mode to RTL or Auto, in APM Planner under "Autopilot Status"  
current Mode is only loiter.

3. Next I in APM Planner(flight planer) set home position (alt = 100) and two 
waypoints. Push "Writes WPs".

4. After these actions mode Auto swithes normaly. But RTL not switched. When I 
switch RTL in APM Planner under "Autopilot Status"  
current Mode is only loiter.

5. Next, go fly.
When I turn on mode Loiter, aircraft hold position perfectly. When I switch to 
Auto, 
i see that in APM Planner under "Autopilot Status"  current Mode is Auto, 
but after a few seconds in APM Planner current Mode switched to 
Loiter(independently)!

6.When I try to switch modes in  APM planner to set_auto or return i have same 
problem.

What version of the product are you using? On what operating system?
OS: Windows XP SP3 and windows 7.

apm 1280 + compass + MTK GPS + hitec aurora9 +airspeed sensor.
APM Planner 1.04 and 1.05
APM 2.2
Radio is a Hitec aurora 9. 

Original issue reported on code.google.com by AlexOg...@gmail.com on 12 Jun 2011 at 12:28

GoogleCodeExporter commented 8 years ago
This is very interesting, and I think it is related to the issue I posted, #360 
(http://code.google.com/p/ardupilot-mega/issues/detail?id=360)

I was assuming that APM Planner couldn't go to whatever mode I had set in 
position Zero, but in fact, maybe it just won't go to RTL (that's what I had in 
position Zero). I will do some more testing. 

Also in a test flight yesterday I had my plane run my entire course of 5 
waypoints, all while being in Loiter mode! More testing is needed, but 
something fishy is going on. 

Original comment by bjior...@gmail.com on 12 Jun 2011 at 7:20

GoogleCodeExporter commented 8 years ago
I've tried putting RTL in any mode position, and in APM Planner it always shows 
up as loiter. For me, Auto seems to work. 

I thought maybe it wouldn't go to RTL because I didn't have GPS lock. But, no, 
if I wait till I have lock, still, no RTL. Then I thought, well, maybe it sees 
the plane is already at home (I'm doing this on the bench), so maybe RTL isn't 
necessary and it goes straight to Loiter. So I walked my plane across the 
block, came home, APM Planner is showing the plane's GPS to be some distance 
away, I switch on RTL, and still, I only see Loiter in APM Planner. 

Flight testing is the next step... I'm curious if the airplane is actually in 
RTL and APM Planner is only showing Loiter incorrectly? Or, is the airplane 
actually in Loiter even though CLI says the mode is RTL? 

Luke

Original comment by bjior...@gmail.com on 12 Jun 2011 at 8:25

GoogleCodeExporter commented 8 years ago
For me, the airplane actually in Loiter even though CLI says the mode is RTL.

Original comment by AlexOg...@gmail.com on 12 Jun 2011 at 8:43

GoogleCodeExporter commented 8 years ago
Well, at least that means APM Planner is accurate! Which is good. But there is 
still a problem though. 

Original comment by bjior...@gmail.com on 12 Jun 2011 at 10:17

GoogleCodeExporter commented 8 years ago
In several sims with X-Plane, when I set the mode to RTL, APM Planner will 
incorrectly show loiter, as discussed, but in actuality, the plane would indeed 
return to launch. 

I will try to do some flight testing soon, but it should be the same in real 
life as the sim. However, this is not what you have noticed. 

Original comment by bjior...@gmail.com on 14 Jun 2011 at 1:28

GoogleCodeExporter commented 8 years ago
Alex, check out this forum thread, it might answer some of these questions:
http://diydrones.com/forum/topics/apm-2012-modes-do-not-seem-to

It seems MavLink does not have a name for RTL, which is why Loiter is shown 
instead. This would also make sense with the behavior I have seen in X-Plane 
sim, where Planner shows "Loiter" but the plane actually does RTL when that is 
the selected mode. 

However, if you found that your aircraft actually did loiter in place even when 
directed to RTL, that is still a problem. 

Original comment by bjior...@gmail.com on 14 Jun 2011 at 6:34

GoogleCodeExporter commented 8 years ago
The flight mode logic has been changed so that auto will report as auto even if 
no mission is loaded or the mission completed without an appropriate 
terminating command.  Also, RTL flight mode now reports as RTL rather than 
Loiter.

Original comment by dewei...@gmail.com on 6 Jul 2011 at 2:38