how to go forward with pymavlink commands?
try sending it a manual control message
https://mavlink.io/en/services/manual_control.html
https://mavlink.io/en/messages/common.html
"""
Example of how to send MANUAL_CONTROL messages to the autopilot using
pymavlink.
This message is able to fully replace the joystick inputs.
"""
# FROM HERE: https://www.ardusub.com/developers/pymavlink.html
# Import mavutil
from pymavlink import mavutil
# Create the connection
master = mavutil.mavlink_connection('udpin:0.0.0.0:14550')
# Wait a heartbeat before sending commands
master.wait_heartbeat()
# Send a positive x value, negative y, negative z,
# positive rotation and no button.
# https://mavlink.io/en/messages/common.html#MANUAL_CONTROL
# Warning: Because of some legacy workaround, z will work between [0-1000]
# where 0 is full reverse, 500 is no output and 1000 is full throttle.
# x,y and r will be between [-1000 and 1000].
master.mav.manual_control_send(
master.target_system,
500,
-500,
250,
500,
0)
# To active button 0 (first button), 3 (fourth button) and 7 (eighth button)
# It's possible to check and configure this buttons in the Joystick menu of QGC
buttons = 1 + 1 << 3 + 1 << 7
master.mav.manual_control_send(
master.target_system,
0,
0,
500, # 500 means neutral throttle
0,
buttons)
I’ll write a whole autonomous sequence. Like tracking a cable etc. What’s the best way to do that?
any solutions?
I’m sorry, but I don’t really understand what you’re trying to do. Can you provide some more specific information on what you’re trying to achieve? Writing an autonomous sequence sounds pretty tough, depending on what level of autonomy you’re looking for.
In the autonomous there will be a gate which has a red flag. And than the robot will just get in side the gate. That’s it
The all sequence will be fully autonomous.