i wrote a script using pymavlink to read data from the fcu (for example RANGEFINDER)
but i only get partial data from it
iv’e attached a screenshot of mission planner’s mavlink inspector and as you can see i have most of my data is in vehicle_1 - Comp 1 AUTOPILOT1, and a bit of the data is in vehicle_1 - Comp 191 MAV_COMP_ID_ONBOARD_COMPUTER.
my scripts only shows me data from the the ONBOARD_COMPUTER so i don’t see data like RANGEFINDER
the script:
from pymavlink import mavutil
the_connection = mavutil.mavlink_connection("udp:127.0.0.1:14550")
print("before Heartbeat")
the_connection.wait_heartbeat()
print("Heartbeat from system (system %u component %u)" % (the_connection.target_system, the_connection.target_component))
while 1:
msg = the_connection.recv_match(blocking=True)
print(msg)
output of the script:
VISION_POSITION_ESTIMATE {usec : 1721115889022000, x : 0.3232124149799347, y : -2.1484549045562744, z : -0.23068875074386597, roll : -0.006977387238293886, pitch : -0.04036278277635574, yaw : 1.5626829862594604, covariance : [0.0, 0.0, -0.0, 0.0, 0.0, -0.0, 0.0, -0.0, 0.0, 0.0, -0.0, 0.0, -0.0, -0.0, 0.0, 0.0, 0.0, -0.0, 0.0, -0.0, 0.0], reset_counter : 0}
HEARTBEAT {type : 18, autopilot : 8, base_mode : 192, custom_mode : 0, system_status : 4, mavlink_version : 3}
HEARTBEAT {type : 2, autopilot : 3, base_mode : 81, custom_mode : 0, system_status : 3, mavlink_version : 3}
VISION_POSITION_ESTIMATE {usec : 1721115889121999, x : 0.32322803139686584, y : -2.1484200954437256, z : -0.23069752752780914, roll : -0.007009660359472036, pitch : -0.04038557782769203, yaw : 1.5627204179763794, covariance : [0.0, 0.0, -0.0, 0.0, 0.0, -0.0, 0.0, -0.0, 0.0, 0.0, -0.0, 0.0, -0.0, -0.0, 0.0, 0.0, 0.0, -0.0, 0.0, -0.0, 0.0], reset_counter : 0}
VISION_POSITION_ESTIMATE {usec : 1721115889221999, x : 0.32330119609832764, y : -2.1483404636383057, z : -0.23070469498634338, roll : -0.006918838247656822, pitch : -0.040338121354579926, yaw : 1.5629016160964966, covariance : [0.0, 0.0, -0.0, 0.0, 0.0, -0.0, 0.0, -0.0, 0.0, 0.0, -0.0, 0.0, -0.0, -0.0, 0.0, 0.0, 0.0, -0.0, 0.0, -0.0, 0.0], reset_counter : 0}
how can i see the data from the other part of the mavlink block? (vehicle_1 - Comp 1 AUTOPILOT1)
im using pixracer pro and running version 4.4.0