http://code.google.com/p/ardupilot-mega/downloads/list

This is a new version of Mega for Alpha testers to try out. Please use this thread to let me know if you are having issue or questions.

Enjoy,
Jason


Things left to do:
- Move the Reverse servo functions to the hardware switches
- finish binary GCS
- uplink parser
- magnetometer support
- better integration of baro sensor

What this release has:
- A complete waypoint command set including Auto Launch, Loiter N times, Loiter N seconds, Land, etc.
- missed waypoint detection
- All flight modes are available.
- Xplane integration with the IMU library for tetsing
- a Waypoint Writer for manually uploading commands - sorry, no GCS yet!


Here are the commands:

CMD_WAYPOINT   - normal autopilot waypoints
CMD_LOITER - enter Loiter mode around the specified coordinates
CMD_LOITER_N_TURNS - enter Loiter mode around the specified coordinates N times
CMD_LOITER_TIME - enter Loiter mode around the specified coordinates N seconds
CMD_RTL - enter RTL mode - come home
CMD_LAND_WP - enter landing mode, got to the specified coordinates
CMD_TAKEOFF - enter takeoff mode, height and pitch defined

CMD_CH_MODE - change flight mode - see defines for corresponding numbers
CMD_RESET_INDEX - start over waypoint commands
CMD_GETVAR_INDEX - return the variable referenced by an index code
CMD_SENDVAR_INDEX - send a variable value referenced by an index code
CMD_TELEMETRY - toggle telemetry on or off

CMD_THROTTLE_CRUISE - set the value of the throttle for cruising
CMD_AIRSPEED_CRUISE - set the value of the target airspeed in meters/second
CMD_LAND - set the pitch, target airspeed, and throttle cruise for landing
CMD_RESET_HOME - resets home to current location

CMD_PAYLOAD_0 - not implemented
CMD_PAYLOAD_1 - not implemented

CMD_KP_GAIN - set the value
CMD_KI_GAIN - set the value
CMD_KD_GAIN - set the value
CMD_KI_MAX - set the value
CMD_KFF_GAIN - set the value
CMD_RADIO_TRIM - set the value
CMD_RADIO_MAX - set the value
CMD_RADIO_MIN - set the value

Here is an example of a command set to launch, loiter 4 times and land. I used special CMD_LAND_WP waypoints for two reasons. They keep the flight mode in "Land" which lets me override the pitch with my own special value. Then it lets me stage my landing in multiple steps. As I reach each waypoint, the next CMD_LAND function is executed and I pitch the nose up and cut the throttle at the last minute.


// 1 pitch 20°, Altitude meters
CMD_TAKEOFF, 20, 0, 0, 100
// 2 Loiter 4 turns around this waypoint
CMD_LOITER_N_TURNS, 4, 37.621392, -122.374660, 80
// 3 Extra point for line up
CMD_WAYPOINT, 0, 37.622354, -122.378007, 40
// 4 Pitch 20°, reduce airspeed to 10 m/s, throttle to 30%, track WP on
CMD_LAND, 20, 10, 30, 1
// 5 This is a special intra-waypoint to keep us in landing mode
CMD_LAND_WP, 0, 37.623880, -122.381736, 30
// 6 Pitch 20°, reduce airspeed to 5 m/s, throttle to 0%, track WP on
CMD_LAND, 20, 5, 0, 1
// 7 This is a special intra-waypoint to keep us in landing mode
CMD_LAND_WP, 0, 37.626073, -122.387028, 20
// 8 Pitch 30°, reduce airspeed to 0 m/s, throttle to 0%, track WP off
CMD_LAND, 30, 0, 0, 0
// 9 our final destination
CMD_LAND_WP, 0, 37.628123, -122.392101, 0

Views: 57

Reply to This

Replies to This Discussion

I've updated Speed 3d in all the libraries. Please re-download them if you have issues.
http://code.google.com/p/ardupilot-mega/downloads/list
Jason
It is weird, when I'm in Auto mode (on the bench) the Ardupilot nicely prints GPS location with a Mediatek attached, but running Stabilize mode it says invalid home position, and the GPS output is all zeros.

Is it possible the GPS is parsed different in stabilize mode?
huh, that is weird. I can't see why. I'll look into it.
Jason,

Thank you this resolved my issue.

Cheers
Is there a how to for the Waypoint_writer_Mega.pde

Thanks
If you look in the Waypoint_writer_Mega.pde file you will see where he includes the command file on lines 11-14. Notice how only one of the command files is being included - in this case short.h:


//#include "T3_candlestick.h"
#include "short.h"
// #include "switzerland.h"
//#include "sparkfun.h"

If you look at these files you will see he has an example of both relative and absolute waypoints. Just create your own command file with the waypoints you want and change the include.
I should also state that on line 41 of "Waypoint_writer_Mega.pde" it looks like he is setting the home location. You may want to do that as well, but I'm not entirely sure how this is used.
Looks like the home location is used to set the origin point for relative commands.
Hi, I’ve just gotten my APM connect up and loaded in with the ver 1.0.1 code. No error was found.
I’m interested how do I test is it working?
@ Torin

This is what i came up with

// How many points are you entering?
#define COMMAND_TOTAL 4
#define WP_TOTAL 3
#define WP_RADIUS 30
#define LOOP_WAYPOINTS 3 // # of times around the pattern
#define ABSOLUTE_WAYPOINTS 1 // 0 = relative, 1 = absolute


float wayPoints[COMMAND_TOTAL][4] = {
{CMD_TAKEOFF, 20, 0, 0, 40},
{0x10, 0, 44.563116,93.222890,50}, // 1
{0x10, 3, 44.563000,93.222453,50}, // 2
{0x10, 0, 44.562877,93.222876,50} // 3
};
Talked to Doug last night we decided and loop waypoints is going away and becoming a command. Just duplicate your waypoints for now with copy paste.
Hi Jason, will the home location also be moved to the external command file?

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service