From a448e82798c2fe83436ae22339a630238bd1d2d3 Mon Sep 17 00:00:00 2001 From: Katrin <48520405+KatrinMoritz@users.noreply.github.com> Date: Wed, 29 Jul 2020 03:34:12 +0200 Subject: [PATCH] Rover Airframe 50004_dfrobot_gpx_asurada: Changing of physical parameter - the values of the parameters GND_MAX_ANG and GND_WHEEL_BASE are outdated. They belonged to another Rover setup. - in the mixer file rover_diff_and_servo.main.mix the steering was controlled by roll, but in PX4 rover steering is controlled by yaw. And this was the reason why the attitude control did not work correctly - the DF Robot GPX:Asurada rover has actual a steering angle of 60 degrees. And and wheel base of 0.17m. Parameter values in the airframe file are changed to this values --- .../init.d/airframes/50004_dfrobot_gpx_asurada | 11 +++-------- .../mixers/rover_diff_and_servo.main.mix | 6 +++--- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/airframes/50004_dfrobot_gpx_asurada b/ROMFS/px4fmu_common/init.d/airframes/50004_dfrobot_gpx_asurada index ae16f7dfb9..6f6d0724af 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/50004_dfrobot_gpx_asurada +++ b/ROMFS/px4fmu_common/init.d/airframes/50004_dfrobot_gpx_asurada @@ -37,11 +37,9 @@ then param set GND_THR_CRUISE 0 param set GND_THR_MAX 0.5 - # Because this is differential drive, it can make a turn with radius 0. - # This corresponds to a turn angle of pi radians. - # If a special case is made for differential-drive, this will need to change. - param set GND_MAX_ANG 3.142 - param set GND_WHEEL_BASE 0.3 + # Differential drive acts like ackermann steering with a maximum turn angle of 60 degrees, or pi/3 radians + param set GND_MAX_ANG 1.042 + param set GND_WHEEL_BASE 0.17 # TODO: Set to -1.0, to allow reversing. This will require many changes in the codebase # to support negative throttle. @@ -71,9 +69,6 @@ then # Enable Airspeed check circuit breaker because Rovers will have no airspeed sensor param set CBRK_AIRSPD_CHK 162128 - # Differential drive acts like ackermann steering with a maximum turn angle of 180 degrees, or pi radians - param set GND_MAX_ANG 3.1415 - fi # Configure this as rover diff --git a/ROMFS/px4fmu_common/mixers/rover_diff_and_servo.main.mix b/ROMFS/px4fmu_common/mixers/rover_diff_and_servo.main.mix index 9277def8da..c6c8dcbe92 100644 --- a/ROMFS/px4fmu_common/mixers/rover_diff_and_servo.main.mix +++ b/ROMFS/px4fmu_common/mixers/rover_diff_and_servo.main.mix @@ -20,18 +20,18 @@ Z: Steering mixer using roll on output 1 ------------------------------------------ M: 1 -S: 0 0 10000 10000 0 -10000 10000 +S: 0 2 10000 10000 0 -10000 10000 Output 2 ------------------------------------------ M: 2 -S: 0 0 -500 -500 0 0 10000 +S: 0 2 -500 -500 0 0 10000 S: 0 3 10000 10000 0 -10000 10000 Output 3 ------------------------------------------ M: 2 -S: 0 0 500 500 0 0 10000 +S: 0 2 500 500 0 0 10000 S: 0 3 10000 10000 0 -10000 10000