MAVROS errors with T200 thrusters

Hi,

I have a Pixhawk 6c connected to 2 T200 thrusters. I have set it up using ArduRover and it is working using a RC.

However, I am trying to use MAVROS to control it and I am getting errors while working with it.

Here are the steps and commands I am running:

  1. Launch the MAVROS node:
roslaunch mavros apm.launch
  1. Sending a MAVROS command to control the channels:
rosrun mavros mavcmd long 183 1 1400 0 0 0 0 0

I am getting the following error:

Request failed. Check mavros logs. ACK: 4

Kindly let me know what can be done or additional information is needed. Thanks!

Hi @kjoshi,

I’m not familiar with MAVROS, but it seems like your command was sent successfully and received a MAV_RESULT_FAILED acknowledgement from the autopilot, indicating there’s some issue in your current vehicle state preventing the command from being accepted.

Searching for what you sent, 183 is MAV_CMD_DO_SET_SERVO, and you’re commanding servo 1 to a PWM of 1400. Generally the first set of servo outputs are assigned as motor outputs, in which case servo commands cannot operate on them. If you need direct servo control of an output like this then the corresponding SERVOn_FUNCTION needs to be set to disabled. Alternatively it could be set to an RCINy channel, or RCPassThru if you want to control them with RC channel values or RC overrides.

Note that assigning a motor output to not a motor means the normal motor controls and safety requirements (arming, failsafes, etc) will no longer apply, so only do this if you know what you’re doing, and do so with care.

1 Like

Thanks a lot @EliotBR . It is working now. I had a query about RC overrides but I noticed that in your comment later.

1 Like