paparazzi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paparazzi-commits] [5651] first attempt at collective pitch thingies


From: antoine drouin
Subject: [paparazzi-commits] [5651] first attempt at collective pitch thingies
Date: Tue, 24 Aug 2010 11:08:22 +0000

Revision: 5651
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5651
Author:   poine
Date:     2010-08-24 11:08:22 +0000 (Tue, 24 Aug 2010)
Log Message:
-----------
first attempt at collective pitch thingies 

Modified Paths:
--------------
    paparazzi3/trunk/conf/airframes/UofAdelaide/A1000_LISA.xml
    paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_mkk.c

Added Paths:
-----------
    
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/actuators_heli.makefile
    paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_heli.c
    paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_heli.h

Modified: paparazzi3/trunk/conf/airframes/UofAdelaide/A1000_LISA.xml
===================================================================
--- paparazzi3/trunk/conf/airframes/UofAdelaide/A1000_LISA.xml  2010-08-24 
10:24:55 UTC (rev 5650)
+++ paparazzi3/trunk/conf/airframes/UofAdelaide/A1000_LISA.xml  2010-08-24 
11:08:22 UTC (rev 5651)
@@ -3,10 +3,11 @@
 <airframe name="A1000 LISA">
 
   <servos min="0" neutral="0" max="0xff">
-    <servo name="FRONT"   no="0" min="0" neutral="0" max="255"/>
-    <servo name="BACK"    no="1" min="0" neutral="0" max="255"/>
-    <servo name="LEFT"    no="2" min="0" neutral="0" max="255"/>
-    <servo name="RIGHT"   no="3" min="0" neutral="0" max="255"/>
+    <servo name="FRONT"        no="0" min="0" neutral="0" max="255"/>
+    <servo name="BACK"         no="1" min="0" neutral="0" max="255"/>
+    <servo name="LEFT"         no="2" min="0" neutral="0" max="255"/>
+    <servo name="RIGHT"        no="3" min="0" neutral="0" max="255"/>
+    <servo name="ESC"          no="4" min="0" neutral="0" max="255"/>
   </servos>
 
   <commands>
@@ -16,6 +17,13 @@
     <axis name="THRUST" failsafe_value="0"/>
   </commands>
 
+  <command_laws>
+    <set servo="ESC"        value="motors_on?ESC_HOVER:ESC_STOPPED"/>
+    <set servo="FRONT"      value=" @PITCH$ + @YAW + @THRUST"/>
+    <set servo="BACK"       value="address@hidden + @YAW + @THRUST"/>
+    <set servo="LEFT"       value=" @ROLL   - @YAW + @THRUST"/>
+    <set servo="RIGHT"      value="address@hidden   - @YAW + @THRUST"/>
+  </command_laws>
 
   <section name="SUPERVISION" prefix="SUPERVISION_">
     <define name="MIN_MOTOR" value="3"/>
@@ -169,7 +177,7 @@
       <param name="RADIO_CONTROL_SPEKTRUM_MODEL" 
              
value="\\\"booz/radio_control/booz_radio_control_spektrum_dx7se.h\\\""/>
     </subsystem>
-    <subsystem name="actuators"     type="asctec"/>
+    <subsystem name="actuators"     type="heli"/>
     <subsystem name="imu"           type="b2_v1.1"/>
     <subsystem name="gps"           type="ublox"/>
     <subsystem name="ahrs"          type="cmpl"/>
@@ -191,33 +199,7 @@
  </firmware>
 
  <makefile>
-
 include $(PAPARAZZI_SRC)/conf/autopilot/lisa_test_progs.makefile
-
-<!-- old makefile version
-ARCH=stm32
-ARCHI=stm32
-BOARD_CFG=\"boards/lisa_0.99.h\"
-FLASH_MODE = JTAG
-
-ap.CFLAGS += -DMODEM_BAUD=B57600
-
-ap.CFLAGS += 
-DRADIO_CONTROL_SPEKTRUM_MODEL_H=\"radio_control/booz_radio_control_spektrum_dx7eu.h\"
-ap.CFLAGS += -DGPS_USE_LATLONG
-ap.CFLAGS += -DGPS_PORT_ID=GPS_PORT_UART1
-
-include $(PAPARAZZI_SRC)/conf/autopilot/booz2_common.makefile
-include $(CFG_BOOZ)/booz2_autopilot.makefile
-
-include $(CFG_BOOZ)/subsystems/booz2_radio_control_spektrum.makefile
-include $(CFG_BOOZ)/subsystems/booz2_actuators_asctec_v2.makefile
-include $(CFG_BOOZ)/subsystems/booz2_imu_b2v1_1.makefile
-include $(CFG_BOOZ)/subsystems/booz_gps_ublox.makefile
-include $(CFG_BOOZ)/subsystems/booz2_ahrs_cmpl.makefile
-
-
-include $(PAPARAZZI_SRC)/conf/autopilot/lisa_test_progs.makefile
--->
  </makefile>
 
 </airframe>

Added: 
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/actuators_heli.makefile
===================================================================
--- 
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/actuators_heli.makefile   
                            (rev 0)
+++ 
paparazzi3/trunk/conf/autopilot/subsystems/rotorcraft/actuators_heli.makefile   
    2010-08-24 11:08:22 UTC (rev 5651)
@@ -0,0 +1,6 @@
+
+ap.srcs += $(SRC_BOOZ)/actuators/booz_actuators_heli.c
+ap.srcs += $(SRC_BOOZ_ARCH)/actuators/booz_actuators_pwm_arch.c
+
+# fixme : this is needed by baro and usualy added by actuators_mkk or 
actuators_asctec
+ap.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c
\ No newline at end of file

Added: paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_heli.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_heli.c           
                (rev 0)
+++ paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_heli.c   
2010-08-24 11:08:22 UTC (rev 5651)
@@ -0,0 +1,56 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2010 The Paparazzi Team
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "booz/booz_actuators.h"
+#include "booz/actuators/booz_actuators_heli.h"
+#include "booz/booz2_commands.h"
+
+/* let's start butchery now and use the actuators_pwm arch functions */
+#include "booz/actuators/booz_actuators_pwm.h"
+
+/* get SetActuatorsFromCommands() macro */
+#include "airframe.h"
+
+/* define the glue between control and SetActuatorsFromCommands */
+#define actuators booz_actuators_pwm_values
+#define SERVOS_TICS_OF_USEC(_v) (_v)
+#define ESC_STOPPED SERVOS_TICS_OF_USEC(1000)
+#define ESC_HOVER   SERVOS_TICS_OF_USEC(1750) 
+#define Actuator(_x)  booz_actuators_pwm_values[_x]
+#define ChopServo(x,a,b) Chop(x, a, b)
+#define ActuatorsCommit()  booz_actuators_pwm_commit()
+
+int32_t booz_actuators_pwm_values[BOOZ_ACTUATORS_PWM_NB];
+
+void actuators_init(void) {
+
+  booz_actuators_pwm_arch_init();
+  
+}
+
+void actuators_set(bool_t motors_on) {
+
+  SetActuatorsFromCommands(booz2_commands);
+
+}
+

Added: paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_heli.h
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_heli.h           
                (rev 0)
+++ paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_heli.h   
2010-08-24 11:08:22 UTC (rev 5651)
@@ -0,0 +1,30 @@
+/*
+ * $Id: actuators_heli$
+ *  
+ * Copyright (C) 2010 The Paparazzi Team
+ *
+ * This file is part of paparazzi.
+ *
+ * paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with paparazzi; see the file COPYING.  If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#ifndef BOOZ_ACTUATORS_HELI_H
+#define BOOZ_ACTUATORS_HELI_H
+
+
+#endif /* BOOZ_ACTUATORS_HELI_H */
+

Modified: paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_mkk.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_mkk.c    
2010-08-24 10:24:55 UTC (rev 5650)
+++ paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_mkk.c    
2010-08-24 11:08:22 UTC (rev 5651)
@@ -24,7 +24,7 @@
 #include "booz_actuators.h"
 #include "actuators/booz_actuators_mkk.h"
 
-#include "booz2_commands.h"
+#include "booz/booz2_commands.h"
 #include "i2c.h"
 #include "sys_time.h"
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]