simulation/gz_bridge: rc_cessna plane model working, Gazebo Garden updates, and prepare for proper airspeed (#20989)

Co-authored-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
This commit is contained in:
Benjamin Perseghetti
2023-01-24 19:01:45 -05:00
committed by GitHub
parent fbd2e111d0
commit 684b4a4b8a
26 changed files with 348 additions and 100 deletions
@@ -1,6 +1,6 @@
#!/bin/sh
#
# @name Gazebo plane
# @name Gazebo rc_cessna
# @type Fixedwing
#
@@ -8,7 +8,7 @@
PX4_SIMULATOR=${PX4_SIMULATOR:=gz}
PX4_GZ_WORLD=${PX4_GZ_WORLD:=default}
PX4_SIM_MODEL=${PX4_SIM_MODEL:=plane}
PX4_SIM_MODEL=${PX4_SIM_MODEL:=rc_cessna}
param set-default EKF2_MAG_ACCLIM 0
param set-default EKF2_MAG_YAWLIM 0
@@ -72,7 +72,7 @@ px4_add_romfs_files(
4001_gz_x500
4002_gz_x500_depth
4003_gz_plane
4003_gz_rc_cessna
6011_gazebo-classic_typhoon_h480
6011_gazebo-classic_typhoon_h480.post
@@ -21,7 +21,7 @@ if [ "$PX4_SIMULATOR" = "sihsim" ] || [ "$(param show -q SYS_AUTOSTART)" -eq "0"
elif [ "$PX4_SIMULATOR" = "gz" ] || [ "$(param show -q SIM_GZ_EN)" -eq "1" ]; then
# source generated gz_env.sh for IGN_GAZEBO_RESOURCE_PATH
# source generated gz_env.sh for GZ_SIM_RESOURCE_PATH
if [ -f ./gz_env.sh ]; then
. ./gz_env.sh
@@ -37,16 +37,8 @@ elif [ "$PX4_SIMULATOR" = "gz" ] || [ "$(param show -q SIM_GZ_EN)" -eq "1" ]; th
gz_command="gz"
gz_sub_command="sim"
else
IGN_GAZEBO_VERSIONS=$(ign gazebo --versions 2>&1)
if [ $? -eq 0 ] && [ "${IGN_GAZEBO_VERSIONS}" != "" ]
then
# "ign gazebo" for Fortress and earlier
gz_command="ign"
gz_sub_command="gazebo"
else
echo "ERROR [init] Gazebo gz and ign commands unavailable"
exit 1
fi
echo "ERROR [init] Gazebo gz please install gz-garden"
exit 1
fi
# look for running ${gz_command} gazebo world