aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2014-01-19 10:44:57 +0100
committerAnton Babushkin <anton.babushkin@me.com>2014-01-19 10:44:57 +0100
commit42f4f459795476c2e695c6a151bd6ccc349658f0 (patch)
tree6c85037928dae1eb8a258aa92c0aff87acb4d7c9
parentd55ef18c7f95b701b7aad3493f4f00fa9da9eaaf (diff)
downloadpx4-firmware-42f4f459795476c2e695c6a151bd6ccc349658f0.tar.gz
px4-firmware-42f4f459795476c2e695c6a151bd6ccc349658f0.tar.bz2
px4-firmware-42f4f459795476c2e695c6a151bd6ccc349658f0.zip
mc_att_control_vector renamed to mc_att_control
-rw-r--r--ROMFS/px4fmu_common/init.d/rc.mc_apps2
-rw-r--r--makefiles/config_px4fmu-v1_default.mk2
-rw-r--r--makefiles/config_px4fmu-v2_default.mk2
-rw-r--r--src/modules/mc_att_control/mc_att_control_main.cpp (renamed from src/modules/mc_att_control_vector/mc_att_control_vector_main.cpp)17
-rw-r--r--src/modules/mc_att_control/mc_att_control_params.c53
-rw-r--r--src/modules/mc_att_control/module.mk (renamed from src/modules/mc_att_control_vector/module.mk)8
-rw-r--r--src/modules/mc_att_control_vector/mc_att_control_vector_params.c20
7 files changed, 64 insertions, 40 deletions
diff --git a/ROMFS/px4fmu_common/init.d/rc.mc_apps b/ROMFS/px4fmu_common/init.d/rc.mc_apps
index 4e0d68147..96fe32c8a 100644
--- a/ROMFS/px4fmu_common/init.d/rc.mc_apps
+++ b/ROMFS/px4fmu_common/init.d/rc.mc_apps
@@ -16,7 +16,7 @@ position_estimator_inav start
#
# Start attitude control
#
-mc_att_control_vector start
+mc_att_control start
#
# Start position control
diff --git a/makefiles/config_px4fmu-v1_default.mk b/makefiles/config_px4fmu-v1_default.mk
index e8c0ef981..51be7e1a1 100644
--- a/makefiles/config_px4fmu-v1_default.mk
+++ b/makefiles/config_px4fmu-v1_default.mk
@@ -82,7 +82,7 @@ MODULES += modules/position_estimator_inav
#
MODULES += modules/fw_pos_control_l1
MODULES += modules/fw_att_control
-MODULES += modules/mc_att_control_vector
+MODULES += modules/mc_att_control
MODULES += modules/mc_pos_control
#MODULES += examples/flow_position_control
#MODULES += examples/flow_speed_control
diff --git a/makefiles/config_px4fmu-v2_default.mk b/makefiles/config_px4fmu-v2_default.mk
index 9dd052a4b..ab05d4e3d 100644
--- a/makefiles/config_px4fmu-v2_default.mk
+++ b/makefiles/config_px4fmu-v2_default.mk
@@ -85,7 +85,7 @@ MODULES += examples/flow_position_estimator
#MODULES += modules/segway # XXX Needs GCC 4.7 fix
MODULES += modules/fw_pos_control_l1
MODULES += modules/fw_att_control
-MODULES += modules/mc_att_control_vector
+MODULES += modules/mc_att_control
MODULES += modules/mc_pos_control
#
diff --git a/src/modules/mc_att_control_vector/mc_att_control_vector_main.cpp b/src/modules/mc_att_control/mc_att_control_main.cpp
index 239bd5570..93974c742 100644
--- a/src/modules/mc_att_control_vector/mc_att_control_vector_main.cpp
+++ b/src/modules/mc_att_control/mc_att_control_main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
*
- * Copyright (c) 2013 PX4 Development Team. All rights reserved.
+ * Copyright (c) 2013, 2014 PX4 Development Team. All rights reserved.
* Author: Tobias Naegeli <naegelit@student.ethz.ch>
* Lorenz Meier <lm@inf.ethz.ch>
* Anton Babushkin <anton.babushkin@me.com>
@@ -35,17 +35,8 @@
****************************************************************************/
/**
- * @file mc_att_control_vector_main.c
+ * @file mc_att_control_main.c
* Implementation of a multicopter attitude controller based on desired rotation matrix.
- *
- * References
- * [1] Daniel Mellinger and Vijay Kumar, "Minimum Snap Trajectory Generation and Control for Quadrotors",
- * http://www.seas.upenn.edu/~dmel/mellingerICRA11.pdf
- *
- * @author Tobias Naegeli <naegelit@student.ethz.ch>
- * @author Lorenz Meier <lm@inf.ethz.ch>
- * @author Anton Babushkin <anton.babushkin@me.com>
- *
*/
#include <nuttx/config.h>
@@ -82,7 +73,7 @@
*
* @ingroup apps
*/
-extern "C" __EXPORT int mc_att_control_vector_main(int argc, char *argv[]);
+extern "C" __EXPORT int mc_att_control_main(int argc, char *argv[]);
#define MIN_TAKEOFF_THROTTLE 0.3f
#define YAW_DEADZONE 0.01f
@@ -698,7 +689,7 @@ MulticopterAttitudeControl::start()
return OK;
}
-int mc_att_control_vector_main(int argc, char *argv[])
+int mc_att_control_main(int argc, char *argv[])
{
if (argc < 1)
errx(1, "usage: mc_att_control_vector {start|stop|status}");
diff --git a/src/modules/mc_att_control/mc_att_control_params.c b/src/modules/mc_att_control/mc_att_control_params.c
new file mode 100644
index 000000000..299cef6c8
--- /dev/null
+++ b/src/modules/mc_att_control/mc_att_control_params.c
@@ -0,0 +1,53 @@
+/****************************************************************************
+ *
+ * Copyright (c) 2013, 2014 PX4 Development Team. All rights reserved.
+ * Author: @author Tobias Naegeli <naegelit@student.ethz.ch>
+ * @author Lorenz Meier <lm@inf.ethz.ch>
+ * @author Anton Babushkin <anton.babushkin@me.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name PX4 nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+/**
+ * @file mc_att_control_params.c
+ * Parameters for multicopter attitude controller.
+ */
+
+#include <systemlib/param/param.h>
+
+PARAM_DEFINE_FLOAT(MC_YAW_P, 2.0f);
+PARAM_DEFINE_FLOAT(MC_YAW_I, 0.0f);
+PARAM_DEFINE_FLOAT(MC_ATT_P, 6.0f);
+PARAM_DEFINE_FLOAT(MC_ATT_I, 0.0f);
+PARAM_DEFINE_FLOAT(MC_YAWRATE_P, 0.3f);
+PARAM_DEFINE_FLOAT(MC_YAWRATE_D, 0.0f);
+PARAM_DEFINE_FLOAT(MC_YAWRATE_I, 0.0f);
+PARAM_DEFINE_FLOAT(MC_ATTRATE_P, 0.1f);
+PARAM_DEFINE_FLOAT(MC_ATTRATE_D, 0.002f);
+PARAM_DEFINE_FLOAT(MC_ATTRATE_I, 0.0f);
diff --git a/src/modules/mc_att_control_vector/module.mk b/src/modules/mc_att_control/module.mk
index de0675df8..64b876f69 100644
--- a/src/modules/mc_att_control_vector/module.mk
+++ b/src/modules/mc_att_control/module.mk
@@ -1,6 +1,6 @@
############################################################################
#
-# Copyright (c) 2012, 2013 PX4 Development Team. All rights reserved.
+# Copyright (c) 2013, 2014 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@@ -35,7 +35,7 @@
# Multirotor attitude controller (vector based, no Euler singularities)
#
-MODULE_COMMAND = mc_att_control_vector
+MODULE_COMMAND = mc_att_control
-SRCS = mc_att_control_vector_main.cpp \
- mc_att_control_vector_params.c
+SRCS = mc_att_control_main.cpp \
+ mc_att_control_params.c
diff --git a/src/modules/mc_att_control_vector/mc_att_control_vector_params.c b/src/modules/mc_att_control_vector/mc_att_control_vector_params.c
deleted file mode 100644
index 613d1945b..000000000
--- a/src/modules/mc_att_control_vector/mc_att_control_vector_params.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * mc_att_control_vector_params.c
- *
- * Created on: 26.12.2013
- * Author: ton
- */
-
-#include <systemlib/param/param.h>
-
-/* multicopter attitude controller parameters */
-PARAM_DEFINE_FLOAT(MC_YAWPOS_P, 2.0f);
-PARAM_DEFINE_FLOAT(MC_YAWPOS_I, 0.0f);
-PARAM_DEFINE_FLOAT(MC_ATT_P, 6.0f);
-PARAM_DEFINE_FLOAT(MC_ATT_I, 0.0f);
-PARAM_DEFINE_FLOAT(MC_YAWRATE_P, 0.3f);
-PARAM_DEFINE_FLOAT(MC_YAWRATE_D, 0.0f);
-PARAM_DEFINE_FLOAT(MC_YAWRATE_I, 0.0f);
-PARAM_DEFINE_FLOAT(MC_ATTRATE_P, 0.1f);
-PARAM_DEFINE_FLOAT(MC_ATTRATE_D, 0.002f);
-PARAM_DEFINE_FLOAT(MC_ATTRATE_I, 0.0f);