mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 02:16:53 +08:00
mc_att_control_vector renamed to mc_att_control
This commit is contained in:
@@ -16,7 +16,7 @@ position_estimator_inav start
|
|||||||
#
|
#
|
||||||
# Start attitude control
|
# Start attitude control
|
||||||
#
|
#
|
||||||
mc_att_control_vector start
|
mc_att_control start
|
||||||
|
|
||||||
#
|
#
|
||||||
# Start position control
|
# Start position control
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ MODULES += modules/position_estimator_inav
|
|||||||
#
|
#
|
||||||
MODULES += modules/fw_pos_control_l1
|
MODULES += modules/fw_pos_control_l1
|
||||||
MODULES += modules/fw_att_control
|
MODULES += modules/fw_att_control
|
||||||
MODULES += modules/mc_att_control_vector
|
MODULES += modules/mc_att_control
|
||||||
MODULES += modules/mc_pos_control
|
MODULES += modules/mc_pos_control
|
||||||
#MODULES += examples/flow_position_control
|
#MODULES += examples/flow_position_control
|
||||||
#MODULES += examples/flow_speed_control
|
#MODULES += examples/flow_speed_control
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ MODULES += examples/flow_position_estimator
|
|||||||
#MODULES += modules/segway # XXX Needs GCC 4.7 fix
|
#MODULES += modules/segway # XXX Needs GCC 4.7 fix
|
||||||
MODULES += modules/fw_pos_control_l1
|
MODULES += modules/fw_pos_control_l1
|
||||||
MODULES += modules/fw_att_control
|
MODULES += modules/fw_att_control
|
||||||
MODULES += modules/mc_att_control_vector
|
MODULES += modules/mc_att_control
|
||||||
MODULES += modules/mc_pos_control
|
MODULES += modules/mc_pos_control
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
+4
-13
@@ -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>
|
* Author: Tobias Naegeli <naegelit@student.ethz.ch>
|
||||||
* Lorenz Meier <lm@inf.ethz.ch>
|
* Lorenz Meier <lm@inf.ethz.ch>
|
||||||
* Anton Babushkin <anton.babushkin@me.com>
|
* 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.
|
* 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>
|
#include <nuttx/config.h>
|
||||||
@@ -82,7 +73,7 @@
|
|||||||
*
|
*
|
||||||
* @ingroup apps
|
* @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 MIN_TAKEOFF_THROTTLE 0.3f
|
||||||
#define YAW_DEADZONE 0.01f
|
#define YAW_DEADZONE 0.01f
|
||||||
@@ -698,7 +689,7 @@ MulticopterAttitudeControl::start()
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mc_att_control_vector_main(int argc, char *argv[])
|
int mc_att_control_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
if (argc < 1)
|
if (argc < 1)
|
||||||
errx(1, "usage: mc_att_control_vector {start|stop|status}");
|
errx(1, "usage: mc_att_control_vector {start|stop|status}");
|
||||||
@@ -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);
|
||||||
@@ -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
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
# Multirotor attitude controller (vector based, no Euler singularities)
|
# 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 \
|
SRCS = mc_att_control_main.cpp \
|
||||||
mc_att_control_vector_params.c
|
mc_att_control_params.c
|
||||||
@@ -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);
|
|
||||||
Reference in New Issue
Block a user