mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
2
Makefile
2
Makefile
@@ -184,7 +184,7 @@ clean:
|
|||||||
# targets handled by cmake
|
# targets handled by cmake
|
||||||
cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak \
|
cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak \
|
||||||
run_cmake_config config gazebo gazebo_gdb gazebo_lldb jmavsim \
|
run_cmake_config config gazebo gazebo_gdb gazebo_lldb jmavsim \
|
||||||
jmavsim_gdb jmavsim_lldb gazebo_gdb_iris gazebo_lldb_vtol gazebo_iris gazebo_vtol
|
jmavsim_gdb jmavsim_lldb gazebo_gdb_iris gazebo_lldb_tailsitter gazebo_iris gazebo_tailsitter
|
||||||
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
|
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|||||||
Submodule Tools/sitl_gazebo updated: d362e661b4...6072426bbc
@@ -88,9 +88,9 @@ then
|
|||||||
ddd --debugger gdb --args mainapp ../../../../${rc_script}_${program}
|
ddd --debugger gdb --args mainapp ../../../../${rc_script}_${program}
|
||||||
elif [ "$debugger" == "valgrind" ]
|
elif [ "$debugger" == "valgrind" ]
|
||||||
then
|
then
|
||||||
valgrind ./mainapp ../../../../${rc_script}_${program}
|
valgrind ./mainapp ../../../../${rc_script}_${program}_${model}
|
||||||
else
|
else
|
||||||
./mainapp ../../../../${rc_script}_${program}
|
./mainapp ../../../../${rc_script}_${program}_${model}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$program" == "jmavsim" ]
|
if [ "$program" == "jmavsim" ]
|
||||||
|
|||||||
64
posix-configs/SITL/init/rcS_gazebo_tailsitter
Normal file
64
posix-configs/SITL/init/rcS_gazebo_tailsitter
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
uorb start
|
||||||
|
simulator start -s
|
||||||
|
param load
|
||||||
|
param set MAV_TYPE 20
|
||||||
|
param set MC_PITCHRATE_P 0.3
|
||||||
|
param set MC_ROLLRATE_P 0.3
|
||||||
|
param set MC_YAW_P 2.0
|
||||||
|
param set MC_YAWRATE_P 0.35
|
||||||
|
param set VT_TYPE 0
|
||||||
|
param set SYS_AUTOSTART 4010
|
||||||
|
param set SYS_RESTART_TYPE 2
|
||||||
|
dataman start
|
||||||
|
param set CAL_GYRO0_ID 2293760
|
||||||
|
param set CAL_ACC0_ID 1376256
|
||||||
|
param set CAL_ACC1_ID 1310720
|
||||||
|
param set CAL_MAG0_ID 196608
|
||||||
|
param set CAL_GYRO0_XOFF 0.01
|
||||||
|
param set CAL_ACC0_XOFF 0.01
|
||||||
|
param set CAL_ACC0_YOFF -0.01
|
||||||
|
param set CAL_ACC0_ZOFF 0.01
|
||||||
|
param set CAL_ACC0_XSCALE 1.01
|
||||||
|
param set CAL_ACC0_YSCALE 1.01
|
||||||
|
param set CAL_ACC0_ZSCALE 1.01
|
||||||
|
param set CAL_ACC1_XOFF 0.01
|
||||||
|
param set CAL_MAG0_XOFF 0.01
|
||||||
|
param set MPC_XY_P 0.15
|
||||||
|
param set MPC_XY_VEL_P 0.05
|
||||||
|
param set MPC_XY_VEL_D 0.005
|
||||||
|
param set MPC_XY_FF 0.1
|
||||||
|
param set SENS_BOARD_ROT 8
|
||||||
|
param set COM_RC_IN_MODE 2
|
||||||
|
rgbled start
|
||||||
|
tone_alarm start
|
||||||
|
gyrosim start
|
||||||
|
accelsim start
|
||||||
|
barosim start
|
||||||
|
adcsim start
|
||||||
|
gpssim start
|
||||||
|
measairspeedsim start
|
||||||
|
pwm_out_sim mode_pwm
|
||||||
|
sleep 1
|
||||||
|
sensors start
|
||||||
|
commander start
|
||||||
|
land_detector start multicopter
|
||||||
|
navigator start
|
||||||
|
attitude_estimator_q start
|
||||||
|
position_estimator_inav start
|
||||||
|
vtol_att_control start
|
||||||
|
mc_pos_control start
|
||||||
|
mc_att_control start
|
||||||
|
fw_pos_control_l1 start
|
||||||
|
fw_att_control start
|
||||||
|
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_x_vtol.main.mix
|
||||||
|
mavlink start -u 14556 -r 2000000
|
||||||
|
mavlink stream -r 80 -s POSITION_TARGET_LOCAL_NED -u 14556
|
||||||
|
mavlink stream -r 80 -s LOCAL_POSITION_NED -u 14556
|
||||||
|
mavlink stream -r 80 -s GLOBAL_POSITION_INT -u 14556
|
||||||
|
mavlink stream -r 80 -s ATTITUDE -u 14556
|
||||||
|
mavlink stream -r 80 -s ATTITUDE_TARGET -u 14556
|
||||||
|
mavlink stream -r 20 -s RC_CHANNELS -u 14556
|
||||||
|
mavlink stream -r 250 -s HIGHRES_IMU -u 14556
|
||||||
|
mavlink stream -r 10 -s OPTICAL_FLOW_RAD -u 14556
|
||||||
|
mavlink boot_complete
|
||||||
|
sdlog2 start -r 100 -e -t -a
|
||||||
@@ -34,7 +34,7 @@ add_dependencies(run_config mainapp)
|
|||||||
|
|
||||||
foreach(viewer none jmavsim gazebo)
|
foreach(viewer none jmavsim gazebo)
|
||||||
foreach(debugger none gdb lldb ddd valgrind)
|
foreach(debugger none gdb lldb ddd valgrind)
|
||||||
foreach(model none iris vtol)
|
foreach(model none iris tailsitter)
|
||||||
if (debugger STREQUAL "none")
|
if (debugger STREQUAL "none")
|
||||||
if (model STREQUAL "none")
|
if (model STREQUAL "none")
|
||||||
set(_targ_name "${viewer}")
|
set(_targ_name "${viewer}")
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ void Simulator::pack_actuator_message(mavlink_hil_controls_t &actuator_msg)
|
|||||||
// for now we only support quadrotors
|
// for now we only support quadrotors
|
||||||
unsigned n = 4;
|
unsigned n = 4;
|
||||||
|
|
||||||
if (_vehicle_status.is_rotary_wing) {
|
if (_vehicle_status.is_rotary_wing || _vehicle_status.is_vtol) {
|
||||||
for (unsigned i = 0; i < 8; i++) {
|
for (unsigned i = 0; i < 8; i++) {
|
||||||
if (_actuators.output[i] > PWM_LOWEST_MIN / 2) {
|
if (_actuators.output[i] > PWM_LOWEST_MIN / 2) {
|
||||||
if (i < n) {
|
if (i < n) {
|
||||||
@@ -113,7 +113,7 @@ void Simulator::pack_actuator_message(mavlink_hil_controls_t &actuator_msg)
|
|||||||
|
|
||||||
actuator_msg.time_usec = hrt_absolute_time();
|
actuator_msg.time_usec = hrt_absolute_time();
|
||||||
actuator_msg.roll_ailerons = out[0];
|
actuator_msg.roll_ailerons = out[0];
|
||||||
actuator_msg.pitch_elevator = _vehicle_status.is_rotary_wing ? out[1] : -out[1];
|
actuator_msg.pitch_elevator = (_vehicle_status.is_rotary_wing || _vehicle_status.is_vtol) ? out[1] : -out[1];
|
||||||
actuator_msg.yaw_rudder = out[2];
|
actuator_msg.yaw_rudder = out[2];
|
||||||
actuator_msg.throttle = out[3];
|
actuator_msg.throttle = out[3];
|
||||||
actuator_msg.aux1 = out[4];
|
actuator_msg.aux1 = out[4];
|
||||||
|
|||||||
@@ -95,9 +95,9 @@
|
|||||||
// Product Name Product Revision
|
// Product Name Product Revision
|
||||||
#define GYROSIMES_REV_C4 0x14
|
#define GYROSIMES_REV_C4 0x14
|
||||||
|
|
||||||
#define GYROSIM_ACCEL_DEFAULT_RATE 1000
|
#define GYROSIM_ACCEL_DEFAULT_RATE 400
|
||||||
|
|
||||||
#define GYROSIM_GYRO_DEFAULT_RATE 1000
|
#define GYROSIM_GYRO_DEFAULT_RATE 400
|
||||||
|
|
||||||
#define GYROSIM_ONE_G 9.80665f
|
#define GYROSIM_ONE_G 9.80665f
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user