How does the DO_WINCH command work? is it supposed to use PWM to control the winch, and use the feedback from the serial port to know when to stop/deliver/etc?
Recently I’ve gotten my daiwa winch working as per the documentation: Daiwa Winch — Copter documentation.
I also have data coming through on WINCH_STATUS:
The problem is, even though the winch works fine through PWM controls, the DO_WINCH mission waypoints don’t do anything other than releasing the clutch of the winch.
I’ve tried to test this on the bench and also have similar results.
Here’s the code i’m using to send command 42600 (MAV_CMD_DO_WINCH: Messages (common) · MAVLink Developer Guide)
import time
from pymavlink import mavutil
#mavutil.set_dialect("ardupilotmega")
autopilot = mavutil.mavlink_connection('udpin:127.0.0.1:14550')
msg = None
# wait for autopilot connection
while msg is None:
msg = autopilot.recv_msg()
print (msg)
# The values of these heartbeat fields is not really important here
# I just used the same numbers that QGC uses
# It is standard practice for any system communicating via mavlink emit the HEARTBEAT message at 1Hz! Your autopilot may not behave the way you want otherwise!
autopilot.mav.heartbeat_send(
6, # type
8, # autopilot
192, # base_mode
0, # custom_mode
4, # system_status
3 # mavlink_version
)
autopilot.mav.command_long_send(
1, # autopilot system id
1, # autopilot component id
42600,
1,
4,
0,
0,
0,
0,
0,
0 # unused parameters for this command
)
The mavproxy screen shows that the message gets sent properly:
I’ve tried to use all kinds of inputs in winch actions (Messages (common) · MAVLink Developer Guide), including winch length control, winch deliver, winch retract, etc. all result in only relaxing the clutch.
Does everything look set up properly here? Is do_winch working correctly for anyone else?