1) control_state added to navdata message 2) Drone 1 tested w/ the driver.

Esse commit está contido em:
Mani Monajjemi
2012-07-05 10:05:38 -07:00
commit f2d0a1b0d5
2 arquivos alterados com 7 adições e 1 exclusões
+5
Ver Arquivo
@@ -3,6 +3,11 @@ Header header
# 0 means no battery, 100 means full battery
float32 batteryPercent
# 0: Unknown, 1: Init, 2: Landed, 3: Flying, 4: Hovering, 5: Test
# 6: Taking off, 7: Goto Fix Point, 8: Landing, 9: Looping
# Note: 3,7 seems to discriminate type of flying (isFly = 3 | 7)
uint32 state
# left/right tilt in degrees (rotation about the X axis)
float32 rotX
+2 -1
Ver Arquivo
@@ -267,7 +267,8 @@ void ARDroneDriver::publish_navdata()
ardrone_brown::Navdata msg;
msg.batteryPercent = navdata.vbat_flying_percentage;
msg.state = (navdata.ctrl_state >> 16);
// positive means counterclockwise rotation around axis
msg.rotX = navdata.phi / 1000.0; // tilt left/right
msg.rotY = -navdata.theta / 1000.0; // tilt forward/backward