New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use MAV_CMD_DO_SET_ACTUATOR in MATLAB? #3028
Comments
Unfortunately this feature is not present in 1.14 - see PX4/PX4-Autopilot#21966 It is still in the docs because it should not have been removed and I have been trying to get it added back. |
@Everglow0214 |
Thanks for your reply. I can arm Pixhawk now. In the code above, I set the rotor inputs to increase linearly. But the rotors' speed seem does not change. And Pixhawk disarms even when the program above is still running. I guess I have to try a lower version of PX4. |
Thanks @bkueng - the docs look correct then thanks. @Everglow0214 Beat is saying that this should work on main and v1.14 so trying a lower version probably isn't necesssary - something else is going on. The vehicle is probably disarming because it isn't getting the ARM command - and in normal use it will turn off so the rotors don't spin on the ground too long. You might need to disable this - see https://docs.px4.io/main/en/advanced_config/parameter_reference.html#COM_DISARM_PRFLT If that doesn't help, please repost the query on the discussion boards - this is no longer a "docs issue". |
This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/how-to-use-mav-cmd-do-set-actuator-in-matlab/36651/1 |
Settings
Pixhawk 4
PX4 1.14.0
MATLAB R2023b
Question
I want to send rotor commands to Pixhawk from MATLAB through telemetry radio. After some search, I think
MAV_CMD_DO_SET_ACTUATOR
is the appropriate interface. I can arm Pixhawk from MATLAB usingMAV_CMD_COMPONENT_ARM_DISARM
. However, I cannot makeMAV_CMD_DO_SET_ACTUATOR
work. My code is as follows.I checked the document at https://github.com/PX4/PX4-user_guide/blob/main/en/payloads/README.md#generic-actuator-control. However, there is no
Peripheral via Actuator Set
in my QGC. The current settings about the rotors are as follows.Thanks in advance.
The text was updated successfully, but these errors were encountered: