Skip to content

Commit

Permalink
configurator: add config for px4_v1_14_0_dronecan_quadrotor
Browse files Browse the repository at this point in the history
  • Loading branch information
PonomarevDA committed Mar 17, 2024
1 parent 2b4234c commit 81fd2b8
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
6 changes: 6 additions & 0 deletions configs/vehicles/px4_v1_14_0_dronecan_quadrotor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
firmware: https://github.com/ZilantRobotics/PX4-Autopilot/releases/download/v1.14.0-0.4.1-beta1/px4_fmu-v5_default.px4
params:
- configs/px4/v1.14/quadcopter/airframe.yaml
- configs/px4/v1.14/quadcopter/dronecan.yaml
- configs/px4/dronecan.yaml
- configs/px4/common.yaml
11 changes: 1 addition & 10 deletions scripts/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,6 @@ px4_v1_14_0_cyphal_octorotor() {
${REPOSITORY_DIR}/configs/px4/common.yaml
}

px4_v1_14_0_dronecan_quadrotor() {
wget -O $DOWNLOADED_BINARY_PATH $PX4_V1_14_0_BETA_DRONECAN_URL
autopilot-configurator -v --firmware $DOWNLOADED_BINARY_PATH -f --config \
${REPOSITORY_DIR}/configs/px4/v1.14/quadcopter/airframe.yaml \
${REPOSITORY_DIR}/configs/px4/v1.14/quadcopter/dronecan.yaml \
${REPOSITORY_DIR}/configs/px4/dronecan.yaml \
${REPOSITORY_DIR}/configs/px4/common.yaml
}

px4_v1_12_1_dronecan_vtol() {
wget -O $DOWNLOADED_BINARY_PATH $PX4_V1_12_1_DRONECAN_URL
autopilot-configurator -v --firmware $DOWNLOADED_BINARY_PATH -f --config \
Expand Down Expand Up @@ -108,7 +99,7 @@ elif [[ $1 == "cyphal_octorotor" ]]; then
px4_v1_14_0_cyphal_octorotor
elif [[ $1 == "cyphal_quadrotor" ]]; then
px4_v1_14_0_cyphal_quadcopter
elif [[ $1 == "dronecan_quadrotor" ]]; then
elif [[ $1 == "px4_v1_14_0_dronecan_quadrotor" ]]; then
px4_v1_14_0_dronecan_quadrotor
else
printf "$RED$SCRIPT_NAME ERROR (line ${LINENO}): Unknown argument: '$1' $NC\n"
Expand Down
9 changes: 5 additions & 4 deletions scripts/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,15 @@ dronecan_vtol_v1_14_0() {
docker container run --rm $DOCKER_FLAGS $IMAGE_NAME ./scripts/run_sim.sh ${vehicle}
}

dronecan_quadrotor() {
px4_v1_14_0_dronecan_quadrotor() {
kill_all_related_containers
setup_dronecan_hitl_config
slcan_checker&
vehicle="px4_v1_14_0_dronecan_quadrotor"
if [[ $OPTIONS == "--force" ]]; then
./configure.sh dronecan_quadrotor
${REPOSITORY_DIR}/scripts/configurator.py ${REPOSITORY_DIR}/configs/vehicles/${vehicle}.yaml
fi
docker container run --rm $DOCKER_FLAGS $IMAGE_NAME ./scripts/run_sim.sh dronecan_flight_goggles
docker container run --rm $DOCKER_FLAGS $IMAGE_NAME ./scripts/run_sim.sh ${vehicle}
}

sitl_inno_vtol() {
Expand Down Expand Up @@ -278,7 +279,7 @@ elif [ "$1" = "dronecan_vtol_v1_12_1" ] || [ "$1" = "dvo" ]; then
elif [ "$1" = "dronecan_vtol_v1_14_0" ] || [ "$1" = "dv" ]; then
dronecan_vtol_v1_14_0
elif [ "$1" = "dronecan_quadrotor" ] || [ "$1" = "dq" ]; then
dronecan_quadrotor
px4_v1_14_0_dronecan_quadrotor
elif [ "$1" = "sitl_inno_vtol" ]; then
sitl_inno_vtol
elif [ "$1" = "sitl_flight_goggles" ]; then
Expand Down
8 changes: 4 additions & 4 deletions scripts/run_sim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Usage: run_sim.sh <command>
Commands:
px4_v1_14_0_beta_dronecan_vtol Run dynamics simulator in DroneCan HITL mode for px4 vtol 13000 airframe
px4_v1_12_1_dronecan_vtol Run dynamics simulator in DroneCan HITL mode for px4 vtol 13070 airframe
dronecan_flight_goggles Run dynamics simulator in DroneCan HITL mode for flight_goggles airframe
px4_v1_14_0_dronecan_quadrotor Run dynamics simulator in DroneCan HITL mode for flight_goggles airframe
cyphal_quadrotor Cyphal HITL PX4 Quadrotor (4001)
cyphal_octorotor Cyphal HITL PX4 Octorotor (12001)
cyphal_standard_vtol Run dynamics simulator in Cyphal HITL mode for vtol 4 motors airframe.
Expand Down Expand Up @@ -108,7 +108,7 @@ px4_v1_12_1_dronecan_vtol() {
dynamics:=vtol_dynamics
}

dronecan_flight_goggles() {
px4_v1_14_0_dronecan_quadrotor() {
setup_ros
setup_dronecan_hitl
$SCRIPT_DIR/airframe_printer.sh 4001
Expand Down Expand Up @@ -238,8 +238,8 @@ if [ "$1" = "px4_v1_14_0_beta_dronecan_vtol" ]; then
px4_v1_14_0_beta_dronecan_vtol
elif [ "$1" = "px4_v1_12_1_dronecan_vtol" ]; then
px4_v1_12_1_dronecan_vtol
elif [ "$1" = "dronecan_flight_goggles" ]; then
dronecan_flight_goggles
elif [ "$1" = "px4_v1_14_0_dronecan_quadrotor" ]; then
px4_v1_14_0_dronecan_quadrotor
elif [ "$1" = "cyphal_quadrotor" ]; then
cyphal_quadrotor
elif [ "$1" = "cyphal_octorotor" ]; then
Expand Down

0 comments on commit 81fd2b8

Please sign in to comment.