Commit ac3807f3 authored by Damien SIX's avatar Damien SIX
Browse files

Crazyflie2.1 model

parent 092799f4
#!/bin/sh
#
# @name Bitcraze Crazyflie2.1
#
# @type + Quadrotor +
#
# @maintainer Damien Six <damien.six@ls2n.fr>
#
. ${R}etc/init.d/rc.mc_defaults
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
param set MC_ROLLRATE_P 0.05
param set MC_ROLL_P 5.0
param set MC_PITCHRATE_K 1.0
param set MC_PITCHRATE_D 0.000
param set MC_PITCHRATE_I 0.1
param set MC_PITCHRATE_P 0.05
param set MC_PITCH_P 5.0
param set MC_YAWRATE_K 1.0
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
#
# @name 3DR Crazyflie2.1 Quadrotor SITL (RTPS)
#
# @type Quadrotor Wide
#
. ${R}etc/init.d-posix/airframes/8011_crazyflie2
\ No newline at end of file
#!/bin/sh
# shellcheck disable=SC2154
micrortps_client start -t UDP -r $((2019+2*px4_instance)) -s $((2020+2*px4_instance))
\ No newline at end of file
......@@ -83,4 +83,7 @@ px4_add_romfs_files(
5012_crazy2fly_rtps
5012_crazy2fly_rtps.post
7011_LS2N_hexarotor
8011_crazyflie2
8012_crazyflie2_rtps
8012_crazyflie2_rtps.post
)
......@@ -21,7 +21,7 @@ function spawn_model() {
X=${X:=0.0}
Y=${Y:=$((3*${N}))}
SUPPORTED_MODELS=("iris" "iris_rtps" "plane" "standard_vtol" "rover" "r1_rover" "typhoon_h480" "crazy2fly" "crazy2fly_rtps")
SUPPORTED_MODELS=("iris" "iris_rtps" "plane" "standard_vtol" "rover" "r1_rover" "typhoon_h480" "crazy2fly" "crazy2fly_rtps" "crazyflie2_rtps")
if [[ " ${SUPPORTED_MODELS[*]} " != *"$MODEL"* ]];
then
echo "ERROR: Currently only vehicle model $MODEL is not supported!"
......@@ -35,7 +35,7 @@ function spawn_model() {
pushd "$working_dir" &>/dev/null
echo "starting instance $N in $(pwd)"
if [ $MODEL = "iris_rtps" ] || [ $MODEL = "crazy2fly_rtps" ]
if [[ $MODEL == *"rtps" ]];
then
'gnome-terminal' -t "RTPSAgent$N" -- micrortps_agent -t UDP -r $((2020+${N}*2)) -s $((2019+${N}*2)) -n "Drone$((1+${N}))"
MODEL_SHORT=$(echo $MODEL | cut -d "_" -f1)
......@@ -47,7 +47,7 @@ function spawn_model() {
echo "Spawning ${MODEL}_${N} at ${X} ${Y}"
gz model --spawn-file=/tmp/${MODEL}_${N}.sdf --model-name=${MODEL}_${N} -x ${X} -y ${Y} -z 0.0
gz model --spawn-file=/tmp/${MODEL}_${N}.sdf --model-name=${MODEL}_${N} -x ${X} -y ${Y} -z 0.1
popd &>/dev/null
......
Subproject commit 5f7cd3ca6414599decbf96418caff19ac418fb48
Subproject commit 0265c721899bd4cc7b0e2c0e486dc2da0f012d19
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