Home        Store        Docs        Blog

ACRO mode and yaw rate commands


(Tim) #1

We are using the blue rov with a custom configuration - Imagine a four thruster quadcopter configuration underwater with the Pixhawk at pitch = 270 (pointing down).

In ACRO mode we are finding that yaw rate commands are disabled at certain angles and we are unable to control yaw rate. Pitch and roll rate control work fine at any angle, however.

We have disabled the Trainer in ACRO mode. I do not see any other parameters that may affect this problem in ACRO mode.

Is there a place in the ArduSub firmware where this is getting disabled?

Thanks in advance,
Tim


(Jacob) #2

Can you please describe the situation more with details on how to reproduce the problem, or with a video?


(Tim) #3

The first below image shows the normal quadcopter flight attitude. We have modified the heavy lift frame definition to account for this modified quadcopter mode. We are using thruster reaction torque and a slightly angled thruster vector to control yaw rate. In ACRO mode yaw rate commands operate correctly when it is in this upright attitude.

In the second image is shown the horizontal flight attitude. In ACRO mode pitch and roll rate commands work correctly, however the yaw rate command produces no thruster blade motion.

I realize this “quadcopter” configuration is not among your supported configs but if you can point me to proper place in the firmware (if that’s where the issue is), I would be grateful.

Thanks, Tim



(Jacob) #4

Please provide your modified source code.

Also, Cool!


(Tim) #5

Source code is Ardusub 3.5.2 with only the following modification of the frame definition found in AP_Motors.cpp:

Also changed the AP orientation in QGC to pitch270. Finally, note that all rate commands (pitch, yaw, roll and throttle) work perfectly in MANUAL mode as one would expect. It’s in ACRO that we are having an issue no yaw rate output in the above shown horizontal flight attitude.


(Jacob) #6

Can you make a video demonstrating the operation in both modes?
Can you paste text that I can copy instead of typing these numbers in if I wanted to try?

If you are asking for help with a piece of software, then you should make it possible for others to run the same software in order to reproduce the problem and find answers.


(Tim) #7

PM’d you Jacob!


(Tim) #8

Here is a simple example of trying to set some yaw while in ACRO mode that doesn’t appear to be working.

from pymavlink import mavutil

#def main():
mavutil.set_dialect("ardupilotmega")
# Create the connection
#master = mavutil.mavlink_connection('udpin:192.168.2.1:14550')
master = mavutil.mavlink_connection('udpin:0.0.0.0:14550')
# Wait a heartbeat before sending commands
master.wait_heartbeat()

# Set all rc chans pwm to 1500 before arming:
data = [ 1500 ] * 8
master.mav.rc_channels_override_send(
	master.target_system, master.target_component, *data)

#############################################################set mode:
# Choose a mode
mode = 'ACRO'
# Get mode ID: return value should be 1 for acro mode
mode_id = master.mode_mapping()[mode]
# Set new mode
master.mav.set_mode_send(
master.target_system,
mavutil.mavlink.MAV_MODE_FLAG_CUSTOM_MODE_ENABLED,
mode_id)

############################################################## Arm
# http://mavlink.org/messages/common#MAV_CMD_COMPONENT_ARM_DISARM
master.mav.command_long_send(
master.target_system,
master.target_component,
mavutil.mavlink.MAV_CMD_COMPONENT_ARM_DISARM,
1,
1, 0, 0, 0, 0, 0, 0)


## Test setting some yaw
    
data[3] = 1600
master.mav.rc_channels_override_send(
	master.target_system, master.target_component, *data)

(Tim) #9

Note that same code works in MANUAL mode.


(Tim) #10

Is anyone able to get this simple bit of code working in ACRO mode?

Thanks in advance for any help!


(Jacob) #11

Confirmed, as the roll/pitch approach +/- 90 degrees, the yaw controller output approaches zero. This is not how it should behave in acro. This is a bug.