I’m building a browser-based GCS and I’m having trouble with the DO_SET_SERVO command while in a mission. Sending the command from the GCS in GUIDED mode works (payload releases but i have to send the command twice, PWM 1050 then 1950). Sending as a part of a mission (AUTO) does not release. I have the DO_SET_SERVO command sandwiched between 2 waypoints with the same lat, lon, alt and a 5s delay on the first waypoint param1. Tried setting SERVO9_FUNCTION to 0 but same outcome. Tried using DO_GRIPPER but no dice inside or outside of missions (i set the proper params based on the docs GRIP_ENABLE, GRIP_TYPE, etc). Triggering the gripper with RC works…
If anyone finds this I was able to solve it by sending a DO_REPEAT_SERVO in the mission with PWM 1950, 2 repeats, and 1 second delay. Also had to set the SERVO9_TRIM to 1100 (Making sure SERVO9_MIN is a lower value i.e. 1050). DO_REPEAT_SERVO effectively sends a pulse between PWM trim and high. Something I can’t seem to trigger using DO_SET_SERVO commands unless I’m outside of a mission (i.e. GUIDED mode).
If you are using pymavlink or something, Instead you can implement do_set_servo command into mode_auto.cpp file in ardupilot modes
1 Like