Hi,
I’m working on a Python script to send commands via Mavproxy to SITL/Arduplane
- If I’m sending directly to Mavproxy servos commands like “RC 3 1800” it works fine
- If I’m doing it with the script I’ve got the error message on Mavproxy
servorelayevent channel 3 is already in use
AP: ServoRelayEvent: Channel 2 is already in use
AP: ServoRelayEvent: Channel 1 is already in use
AP: ServoRelayEvent: Channel 3 is already in use
The RC commands in the Python script :
master.mav.command_long_send(
master.target_system,
master.target_component,
mavutil.mavlink.MAV_CMD_DO_SET_SERVO,
0, # confirmation
2, # param1
1500, # param2
0, # param3
0, # param4
0, # param5
0, # param6
0) # param7
master.mav.command_long_send(
master.target_system,
master.target_component,
mavutil.mavlink.MAV_CMD_DO_SET_SERVO,
0, # confirmation
1, # param1
1500, # param2
0, # param3
0, # param4
0, # param5
0, # param6
0) # param7
master.mav.command_long_send(
master.target_system,
master.target_component,
mavutil.mavlink.MAV_CMD_DO_SET_SERVO,
0, # confirmation
3, # param1
1800, # param2
0, # param3
0, # param4
0, # param5
0, # param6
0) # param7
In the config :
SERVO 1 + 2 + 3 are Ok dans MP
SERVO1_FUNCTION = Roll
SERVO2_FUNCTION = Pitch
SERVO3_FUNCTION = Throttle
After searching in the forum, and in the Mavlink documentation, it seems that “RC_CHANNELS_OVERRIDE” can be the solution (but not really sure …)
https://ardupilot.org/dev/docs/mavlink-move-servo.html
https://ardupilot.org/plane/docs/parameters.html#servo1-function-servo-output-function
So I tried these commands below to try to override a config (I don’t know wich one to be honest as all seems to be right…)
long MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE 0 0 70 0 0 0 0 0
long MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE 0 0 0 0 0 0 0 0
long MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE 0 0 1 0 0 0 0 0
And well still same problem, if anyone has an idea, you’re welcome !
Thanks
Nico