Mission Planner and APM home position, confuse topic for most users

2,985 views
Skip to first unread message

Olivier ADLER

unread,
Jun 23, 2013, 8:35:16 PM6/23/13
to drones-...@googlegroups.com


I think that there is a lot of confusion about Mission Planner and APM home positions.


The confusion does come from the fact that they are linked unidirectionally : home position is copied from the APM to Mission Planner but never the opposite.

According to some forum posts i did find, even the developers do not have a clear view of that for Arducopter.


I did try to understand it the best i could a couple weeks ago, and i hope that i'm near the truth in this reply i gave to a forum user.

Those informations are almost impossible to find, i think that a summary of this should go in the Wiki because it is important for mission planning.



Here is the user question :

Another issue from the same .tlog:

Setting HOME during a mission doesn't seem to work. It looks like it does the right thing in Mission Planner but the copter ignores it. You can see it arms at 10% and auto-sets HOME, I do a RTL to that location around 14%, then set HOME to a different location and another RTL at 16%, which again goes back to the original arming location rather than the new HOME (there was another RTL at 14.5% but I'd forgotten to send the new mission to the copter for that one, so the 16% one is the error case).

Is this a firmware or Mission Planner issue?

Setting HOME during a mission is really important for long range missions from A to B where you pass a point of no return and won't have power to RTL home to A again. Another case is launching from a boat, you don't want to RTL back to where the boat was (as it is now an empty and unwelcoming patch of sea), but to set HOME perhaps to a nearby bit of land in case you lose contact.




And is my reply, (comments are welcome) :


The Mission Planner home position is never transmitted to the APM except with the Do_Set_Home command from a mission (i never tried it nevertheless, but it seems implemented in the Arducopter code).

Only the home position stored inside the APM is sent to Mission Planner when waypoints are loaded from the APM or when you click the "Home Location" link (right down corner of Mission Planner).

When reading the APM waypoints, Mission Planner ask you if you want to reset Mission Planner home position coordinates to the APM home position ones.

Mission Planner will never send its home position to the APM and there is no command to do that in real time. Mission Planner home position should be considered as a geographic mark to make other waypoints positioning easier, to pan the Map to the right location when you start to fly at a new field, or to get the distance from home on the map, not more.

The APM always use the home position stored at arming or as soon as there is a GPS 3D fix. I think that it's better like this for a safer experience. This guarantee that RTL will work regardless the stored mission.

If Geofence is enabled, then you will not be able to arm before a 3D fix, to guarantee that RTL will use the take off location.

I think that RTL to Mission Planner home position is not implemented inside Arducopter. And even if this was working, RTL mode should have been initiated from Mission Planner directly so that the RTL coordinates could be sent through Mavlink. This will never work from a RC radio initiated RTL, because the APM does not have any idea about where Mission Planner home position is.

In the end :

- you could use guided mode to send the copter to a desired position in realtime from Mission Planner (Fly to here on the Map with the right mouse button) so that if you are on a moving boat you could ask your copter to come back to it.

- you can change the APM home position during a mission using DO_SET_HOME command

(with parameter 1 = 1 to use current position as the home position, or with coordinates to set a free one).

This should allow to solve your long range mission problem, where the RTL target needs to be updated at each no return waypoint.


Olivier



Randy Mackay

unread,
Jun 23, 2013, 8:57:50 PM6/23/13
to drones-...@googlegroups.com
Olivier,

     I think as much as possible we should try and get the mission planner's home position to always be the same as arducopter's home position.  We got closer with this when MichaelO implemented the feature so that the mission planner pulls the home position from arducopter after arming.

     I think the mission planner actually does write it's home position to arducopter when it writes a mission but this is a bit pointless because it just gets overwritten when arducopter arms.

     There is an issue to allow the mission planner to override ArduCopter's home position and for ArduCopter to *not* overwrite it again when it arms.  I think that would be a fine feature with some additional safe guards to ensure the user doesn't take-off with a crazy home position.

     Txs for giving that advice to the user on other ways to achieve what they want.  The LAND command would also be a good one to use in place of RTL if he/she wants to bring the copter down at a different location than home.

-Randy



From: Olivier ADLER <cont...@nerim.net>
To: drones-...@googlegroups.com
Sent: Monday, June 24, 2013 9:35 AM
Subject: [drones-discuss] Mission Planner and APM home position, confuse topic for most users

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


Andrew Chapman

unread,
Jun 24, 2013, 1:26:47 AM6/24/13
to drones-...@googlegroups.com
On 2013-06-23 5:57 PM, Randy Mackay wrote:
     I think as much as possible we should try and get the mission planner's home position to always be the same as arducopter's home position.  We got closer with this when MichaelO implemented the feature so that the mission planner pulls the home position from arducopter after arming.

     I think the mission planner actually does write it's home position to arducopter when it writes a mission but this is a bit pointless because it just gets overwritten when arducopter arms.

Hi guys, thanks Olivier for your forum response and for following up here.

Randy, MP doesn't seem to write the home position to the copter, that's what I was testing. I set home, clicked write and for sure saw it saying it was writing waypoint zero, but it didn't use it for RTL.

If it requires a DO_SET_HOME to update the home position to the copter then I think that command should be sent (and acknowledgement of the new location verified) before setting the displayed home point in MP, otherwise it is showing one thing and doing another, which is dangerous, particularly in the boat example. If it is deliberate that the MP and copter have different concepts of home, then I'm not sure why - to me they should be the same.



The LAND command would also be a good one to use in place of RTL if he/she wants to bring the copter down at a different location than home.

Yes, but only if all is going well. In the event of a rx failsafe it will still attempt to get back to the armed location, which in the long range A-to-B or boat examples is dangerous. You can set rx failsafe to complete an auto mission rather than RTL, but you might not be in auto mode, e.g. flying around a boat in ALT_HOLD taking photos back at it.

AC.


Olivier ADLER

unread,
Jun 24, 2013, 6:22:13 AM6/24/13
to drones-...@googlegroups.com, Randy Mackay


Yes, but as a side not, the LAND command will not help during a failsafe condition (lost radio link for example). In this case, for a long mission with multiple RTL targets (no return points), dynamically repositioning RTL targets with DO_SET_HOME seems the only reliable method.


Olivier.

Robert Lefebvre

unread,
Jun 24, 2013, 7:56:00 AM6/24/13
to drones-discuss
Andrew, I agree that at the very least we need to get MP to stop this "showing one thing and doing another".  I've also been inadvertently being fooled by this, luckily I didn't have a problem.  But I several times tried moving the home location a few meters, and then it RTL's somewhere else.  Luckily it's always been at my club field, and I just moved the Home location from one place on the runway to another.  I just wanted it to land somewhere other than where it took off.


Kevin Hester

unread,
Jun 24, 2013, 1:58:43 PM6/24/13
to drones-discuss
btw: From reading this thread - it sounds like recommended behavior is to repull the home position after the vehicle changes to armed.  True?  If so, I'll add this to the next version of Andropilot (sometime later this week - been working on other stuff)

Craig Elder

unread,
Jun 25, 2013, 1:25:30 AM6/25/13
to drones-discuss
Kevin
MP requests the home position from the vehicle after the status changes to armed

Randy Mackay

unread,
Jun 26, 2013, 8:14:09 AM6/26/13
to drones-...@googlegroups.com
Kevin,

     Yes, that's how the mission planner is working.  For copters it pulls the home position from the APM after it sees the copter arm.  For planes...well, their home defaults to where they first get GPS lock but the GCS can override that when waypoints are uploaded (but you probably already knew that).

-Randy



From: Kevin Hester <kev...@geeksville.com>
To: drones-discuss <drones-...@googlegroups.com>
Sent: Tuesday, June 25, 2013 2:58 AM
Subject: Re: [drones-discuss] Mission Planner and APM home position, confuse topic for most users

hellowitsch

unread,
Mar 23, 2014, 8:52:23 AM3/23/14
to drones-...@googlegroups.com
Opposite behaviour experienced on Arducopter 3.1.2:
I have experienced that my copter went to a "home" position in RTL, where I had previously entered the mission in mission planner (at home on my desktop computer), not to the arming site.
After my blood pressure went normal again, I went home and manually set "home" to the desired arming (Launch) location in mission planner. After that RTL worked out.
Is this a bug, or intentional?
Am I missing something?

Cheers
Marcel

Randy Mackay

unread,
Mar 24, 2014, 3:01:57 AM3/24/14
to drones-...@googlegroups.com
Marcel,

     If you have a dataflash log we can have a look.  Home is always set to the last position it was in (or thought it was in) when armed or if the vehicle was armed without a GPS lock then it will be at the position that it first gained GPS lock.

-Randy


--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages