This is a quick how-to to get going with ArduPilotMega QGroundControl Integration. Note that this is a work in progress and that the gains/ waypoints sent to the apm are not currently setting the values in the autopilot. I'll be working today to hook these up. I could really use help debugging and coding though so I've posted this to get everyone else up to speed.
- Get ArduPilotMega mavlink branch: svn checkout http://ardupilot-mega.googlecode.com/svn/ArduPilotMega/branches/mavlink "pathtosketchbook"/ArduPilotMega
- Get Arducopter libraries: svn checkout http://arducopter.googlecode.com/svn/trunk/libraries "pathtosketchbook"/libraries
- Get Mavlink: git clone https://github.com/pixhawk/mavlink.git "pathtosketchbook"/libraries/mavlink
- Get QGroundControl: http://qgroundcontrol.org/downloads or build from source: git clone https://github.com/pixhawk/qgroundcontrol.git "base directory"/qgroundcontrol, if you build from source you will need to copy "pathtosketchbook"/libraries/mavlink to "base directory" or create a symbolic link
- Set sketchbook path for arduino to "pathtosketchbook", then restart arduino IDE.
- Create an APM_Config.h file as seen below.
- Compile and upload code to board.
- Start QGroundControl, select network, add link, set to comm port (/dev/ttyUSB* on linux, COM* on windows) and then set the baud rate to 115200 (if using GCS_PORT 3)
Here is some documentation:
APM_Config.h file:
#define FLIGHT_MODE_CHANNEL 8
#define FLIGHT_MODE_1 AUTO
#define FLIGHT_MODE_2 RTL
#define FLIGHT_MODE_3 FLY_BY_WIRE_A
#define FLIGHT_MODE_4 FLY_BY_WIRE_B
#define FLIGHT_MODE_5 STABILIZE
#define FLIGHT_MODE_6 MANUAL
#define GCS_PROTOCOL GCS_PROTOCOL_MAVLINK
#define ENABLE_HIL ENABLED
#define GCS_PORT 3
#define GPS_PROTOCOL GPS_PROTOCOL_IMU
#define AIRSPEED_CRUISE 25
#define THROTTLE_FAILSAFE ENABLED
#define AIRSPEED_SENSOR ENABLED
Comments
Any chance another stable APM release will be coming out any time soon?
Baud Rate 38400== CLI messages sometimes
I got the latest libraries ,and mavlink files just this morning .
My APM doesn't seem to be sending any sensor data to qGCS, the serial link happens , and i get the ArdupilotMega CLI messages sometimes , other times just gibberish .
Tha APM_Config.h is just as above .
Im trying all of this on a Mac (10.6.5 ) , is that why it isnt working ?
ArduPilotMega.cpp: In function 'void fast_loop()':
ArduPilotMega:518: error: 'class AP_GPS_HIL' has no member named 'airspeed'
ArduPilotMega:527: error: 'class AP_GPS_HIL' has no member named 'roll_sensor'
ArduPilotMega:528: error: 'class AP_GPS_HIL' has no member named 'pitch_sensor'
i do not get this error when i use the regular ArdupilotMega code (non ArduCopter).