Hi,
I’m using pymavlink on my Edison in a Pixhawk2 to monitor the incoming commands from the Ground control station. I am trying to read the mavlink messages using pymavlink with this small script,
from pymavlink import mavutil
master = mavutil.mavlink_connection('127.0.0.1:14655', 921600)
master.wait_heartbeat()
master.mav.request_data_stream_send(master.target_system, master.target_component,
mavutil.mavlink.MAV_DATA_STREAM_ALL, 4, 1)
while True:
msg = master.recv_match()
if msg:
print msg
However, I am only seeing a subset of the mavlink messages which are the status messages like ATTITUDE
, RC_CHANNELS
etc. I am also able to see SET_MODE
messages when I change mode using Mission Planner. However, when I arm or disarm the drone, I only see the COMMAND_ACK
message and STATUSTEXT
but not the MAV_CMD_COMPONENT_ARM_DISARM
message or COMMAND_LONG
.
What can I do to get the MAV_CMD
messages?