Commit 1fad029c authored by Damien SIX's avatar Damien SIX
Browse files

Motors direct control

parent 75677044
......@@ -36,4 +36,5 @@ add_subdirectory(airframes)
px4_add_romfs_files(
rc.replay
rcS
rc.mc_simulation_ls2n
)
......@@ -8,10 +8,8 @@
#
. ${R}etc/init.d/rc.mc_defaults
. ${R}etc/init.d-posix/rc.mc_simulation_ls2n
param set PWM_MAIN_MAX 1000
param set PWM_MAIN_MIN 0
param set THR_MDL_FAC 1.0
param set MC_ROLLRATE_K 1.8
param set MC_ROLLRATE_D 0.002
......@@ -28,13 +26,6 @@ param set MC_YAWRATE_D 0.002
param set MC_YAWRATE_I 0.1
param set MC_YAWRATE_P 0.2
param set MC_YAW_P 5.0
param set EKF2_AID_MASK 24
param set EKF2_EVV_NOISE 0.01
param set EKF2_EV_DELAY 10.0
param set EKF2_EV_NOISE_MD 1
param set EKF2_GPS_CHECK 0
param set EKF2_HGT_MODE 3
param set EKF2_REQ_GPS_H 10.0
param set MC_PITCHRATE_MAX 1800.0
param set MC_ROLLRATE_MAX 1800.0
param set MC_YAWRATE_MAX 1800.0
......
......@@ -8,10 +8,8 @@
#
. ${R}etc/init.d/rc.mc_defaults
. ${R}etc/init.d-posix/rc.mc_simulation_ls2n
param set PWM_MAIN_MAX 1000
param set PWM_MAIN_MIN 0
param set THR_MDL_FAC 1.0
param set MC_ROLLRATE_K 1.0
param set MC_ROLLRATE_D 0.00
param set MC_ROLLRATE_I 0.1
......@@ -27,14 +25,5 @@ param set MC_YAWRATE_D 0.000
param set MC_YAWRATE_I 0.2
param set MC_YAWRATE_P 0.2
param set MC_YAW_P 0.5
param set EKF2_AID_MASK 24
param set EKF2_EVV_NOISE 0.01
param set EKF2_EV_DELAY 10.0
param set EKF2_EV_NOISE_MD 1
param set EKF2_GPS_CHECK 0
param set EKF2_HGT_MODE 3
param set EKF2_REQ_GPS_H 10.0
param set MC_PITCHRATE_MAX 1800.0
param set MC_ROLLRATE_MAX 1800.0
param set MC_YAWRATE_MAX 1800.0
set MIXER quad_+
#!/bin/sh
#
# LS2N simulation parameters
#
# shellcheck disable=SC2154
param set PWM_MAIN_MAX 1000
param set PWM_MAIN_MIN 0
param set THR_MDL_FAC 1.0
param set EKF2_AID_MASK 24
param set EKF2_EVV_NOISE 0.01
param set EKF2_EV_DELAY 10.0
param set EKF2_EV_NOISE_MD 1
param set EKF2_GPS_CHECK 0
param set EKF2_HGT_MODE 3
param set EKF2_REQ_GPS_H 10.0
param set COM_OBL_ACT 4
param set COM_OBL_RC_ACT 4
param set COM_RC_IN_MODE 1
param set NAV_RCL_ACT 4
param set COM_RC_OVERRIDE 0
Subproject commit 935da5e806569807553ed7d32ae61ac19d4fb409
Subproject commit 7a1ab7d3c76194a1e31c98e9607047c8d3611e4b
......@@ -115,5 +115,5 @@ if(REPLAY_FILE)
message(STATUS "Building without lockstep for replay")
set(ENABLE_LOCKSTEP_SCHEDULER no)
else()
set(ENABLE_LOCKSTEP_SCHEDULER yes)
set(ENABLE_LOCKSTEP_SCHEDULER no)
endif()
......@@ -7,3 +7,4 @@ bool velocity
bool acceleration
bool attitude
bool body_rate
bool motors
......@@ -3,6 +3,7 @@ rtps:
id: 0
- msg: actuator_controls
id: 1
send: true
- msg: actuator_outputs
id: 3
- msg: adc_report
......@@ -330,6 +331,8 @@ rtps:
- msg: actuator_controls_0
id: 170
alias: actuator_controls
send: true
receive: true
- msg: actuator_controls_1
id: 171
alias: actuator_controls
......
......@@ -3903,12 +3903,13 @@ Commander::offboard_control_update()
old.velocity != ocm.velocity ||
old.acceleration != ocm.acceleration ||
old.attitude != ocm.attitude ||
old.body_rate != ocm.body_rate) {
old.body_rate != ocm.body_rate ||
old.motors != ocm.motors) {
_status_changed = true;
}
if (ocm.position || ocm.velocity || ocm.acceleration || ocm.attitude || ocm.body_rate) {
if (ocm.position || ocm.velocity || ocm.acceleration || ocm.attitude || ocm.body_rate || ocm.motors) {
offboard_available = true;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment