Starting with the new ardupilot code check in your host OS.
droneapi-python will be installed, but allows you to get sample scripts:
ardupilot$ git clone http:
Lift the box of strollers:
ardupilot$ vagrant up
Run SITL as described in "Configuring SITL Using Vagrant" :
ardupilot$ vagrant ssh -c "sim_vehicle.sh -j 2"
There will be a lot of output, but in the end I see the following:
+ mavproxy.py --master tcp:127.0.0.1:5760 --sitl 127.0.0.1:5501 --out 10.0.2.2:14550 --out 127.0.0.1:14550 --out 127.0.0.1:14551 --cmd= Connect tcp:127.0.0.1:5760 source_system=255 Logging to mav.tlog libdc1394 error: Failed to initialize libdc1394 MAV> Init APM:Copter V3.3-dev (e1be8148) Free RAM: 4096 FW Ver: 120 ---------------------------------------- Firmware change: erasing EEPROM... done. 0 0 0 online system 1 STABILIZE> Mode STABILIZE APM: APM:Copter V3.3-dev (e1be8148) APM: Frame: QUAD APM: Calibrating barometer APM: Initialising APM... APM: barometer calibration complete APM: GROUND START Init Gyro** INS ---------------------------------------- G_off: 0.00, 0.00, 0.00 A_off: 0.00, 0.00, 0.00 A_scale: 1.00, 1.00, 1.00 Ready to FLY ublox Received 473 parameters fence breach GPS lock at 0 meters APM: PreArm: RC not calibrated
Download the droneapi module. See "DroneKit Download" for information on how to do this automatically when you run mavproxy.
STABILIZE> module load droneapi.module.api STABILIZE> DroneAPI loaded
Run DroneKit small_demo.py script :
STABILIZE> api start ../droneapi-python/example/small_demo/small_demo.py
Output:
STABILIZE> Mode: VehicleMode:STABILIZE Location: Location:lat=-35.3632609,lon=149.1652299,alt=-0.280000001192,is_relative=False Attitude: Attitude:pitch=-0.0046319803223,yaw=-0.571676075459,roll=-0.00480426847935 Velocity: [0.11, -0.06, -0.06] GPS: GPSInfo:fix=3,num_sat=10 Armed: False groundspeed: 0.0 airspeed: 0.0 Requesting 0 waypoints t=Fri May 1 02:18:50 2015 now=Fri May 1 02:18:50 2015 Home WP: MISSION_ITEM {target_system : 255, target_component : 0, seq : 0, frame : 0, command : 16, current : 0, autocontinue : 1, param1 : 0.0, param2 : 0.0, param3 : 0.0, param4 : 0.0, x : -35.3632621765, y : 149.165237427, z : 584.33001709} Current dest: 0 Disarming... Arming... Overriding a RC channel Current overrides are: {'1': 900, '4': 1000} RC readback: {'1': 1500, '3': 1000, '2': 1500, '5': 1800, '4': 1500, '7': 1000, '6': 1000, '8': 1800} Cancelling override APIThread-0 exiting... Got MAVLink msg: COMMAND_ACK {command : 400, result : 0} APM: PreArm: RC not calibrated Got MAVLink msg: COMMAND_ACK {command : 400, result : 4} Got MAVLink msg: COMMAND_ACK {command : 11, result : 0} AUTO> Mode AUTO