INSTRUCTION stringlengths 1 46.3k | RESPONSE stringlengths 75 80.2k |
|---|---|
Request a list of available logs. On some systems calling this may
stop on-board logging until LOG_REQUEST_END is called.
target_system : System ID (uint8_t)
target_component : Component ID (uint8_t)
start : First ... | def log_request_list_encode(self, target_system, target_component, start, end):
'''
Request a list of available logs. On some systems calling this may
stop on-board logging until LOG_REQUEST_END is called.
target_system : System ID (uint8_t)
... |
Request a list of available logs. On some systems calling this may
stop on-board logging until LOG_REQUEST_END is called.
target_system : System ID (uint8_t)
target_component : Component ID (uint8_t)
start : First ... | def log_request_list_send(self, target_system, target_component, start, end, force_mavlink1=False):
'''
Request a list of available logs. On some systems calling this may
stop on-board logging until LOG_REQUEST_END is called.
target_system : S... |
Reply to LOG_REQUEST_LIST
id : Log id (uint16_t)
num_logs : Total number of logs (uint16_t)
last_log_num : High log number (uint16_t)
time_utc : UTC timestamp of log in seconds since 19... | def log_entry_encode(self, id, num_logs, last_log_num, time_utc, size):
'''
Reply to LOG_REQUEST_LIST
id : Log id (uint16_t)
num_logs : Total number of logs (uint16_t)
last_log_num : Hig... |
Reply to LOG_REQUEST_LIST
id : Log id (uint16_t)
num_logs : Total number of logs (uint16_t)
last_log_num : High log number (uint16_t)
time_utc : UTC timestamp of log in seconds since 19... | def log_entry_send(self, id, num_logs, last_log_num, time_utc, size, force_mavlink1=False):
'''
Reply to LOG_REQUEST_LIST
id : Log id (uint16_t)
num_logs : Total number of logs (uint16_t)
last_log_nu... |
Request a chunk of a log
target_system : System ID (uint8_t)
target_component : Component ID (uint8_t)
id : Log id (from LOG_ENTRY reply) (uint16_t)
ofs : Offset into the log (uint32_t)
... | def log_request_data_encode(self, target_system, target_component, id, ofs, count):
'''
Request a chunk of a log
target_system : System ID (uint8_t)
target_component : Component ID (uint8_t)
id :... |
Request a chunk of a log
target_system : System ID (uint8_t)
target_component : Component ID (uint8_t)
id : Log id (from LOG_ENTRY reply) (uint16_t)
ofs : Offset into the log (uint32_t)
... | def log_request_data_send(self, target_system, target_component, id, ofs, count, force_mavlink1=False):
'''
Request a chunk of a log
target_system : System ID (uint8_t)
target_component : Component ID (uint8_t)
id ... |
Reply to LOG_REQUEST_DATA
id : Log id (from LOG_ENTRY reply) (uint16_t)
ofs : Offset into the log (uint32_t)
count : Number of bytes (zero for end of log) (uint8_t)
data ... | def log_data_encode(self, id, ofs, count, data):
'''
Reply to LOG_REQUEST_DATA
id : Log id (from LOG_ENTRY reply) (uint16_t)
ofs : Offset into the log (uint32_t)
count : Numb... |
Reply to LOG_REQUEST_DATA
id : Log id (from LOG_ENTRY reply) (uint16_t)
ofs : Offset into the log (uint32_t)
count : Number of bytes (zero for end of log) (uint8_t)
data ... | def log_data_send(self, id, ofs, count, data, force_mavlink1=False):
'''
Reply to LOG_REQUEST_DATA
id : Log id (from LOG_ENTRY reply) (uint16_t)
ofs : Offset into the log (uint32_t)
count ... |
Erase all logs
target_system : System ID (uint8_t)
target_component : Component ID (uint8_t) | def log_erase_send(self, target_system, target_component, force_mavlink1=False):
'''
Erase all logs
target_system : System ID (uint8_t)
target_component : Component ID (uint8_t)
'''
return self.send(se... |
Stop log transfer and resume normal logging
target_system : System ID (uint8_t)
target_component : Component ID (uint8_t) | def log_request_end_send(self, target_system, target_component, force_mavlink1=False):
'''
Stop log transfer and resume normal logging
target_system : System ID (uint8_t)
target_component : Component ID (uint8_t)
'''
... |
data for injecting into the onboard GPS (used for DGPS)
target_system : System ID (uint8_t)
target_component : Component ID (uint8_t)
len : data length (uint8_t)
data : raw data (110 is enoug... | def gps_inject_data_encode(self, target_system, target_component, len, data):
'''
data for injecting into the onboard GPS (used for DGPS)
target_system : System ID (uint8_t)
target_component : Component ID (uint8_t)
le... |
data for injecting into the onboard GPS (used for DGPS)
target_system : System ID (uint8_t)
target_component : Component ID (uint8_t)
len : data length (uint8_t)
data : raw data (110 is enoug... | def gps_inject_data_send(self, target_system, target_component, len, data, force_mavlink1=False):
'''
data for injecting into the onboard GPS (used for DGPS)
target_system : System ID (uint8_t)
target_component : Component ID (uint8_t... |
Second GPS data. Coordinate frame is right-handed, Z-axis up (GPS
frame).
time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t)
fix_type : See the GPS_FIX_TYPE enum. (uint8_t)
l... | def gps2_raw_encode(self, time_usec, fix_type, lat, lon, alt, eph, epv, vel, cog, satellites_visible, dgps_numch, dgps_age):
'''
Second GPS data. Coordinate frame is right-handed, Z-axis up (GPS
frame).
time_usec : Timestamp (microseconds ... |
Second GPS data. Coordinate frame is right-handed, Z-axis up (GPS
frame).
time_usec : Timestamp (microseconds since UNIX epoch or microseconds since system boot) (uint64_t)
fix_type : See the GPS_FIX_TYPE enum. (uint8_t)
l... | def gps2_raw_send(self, time_usec, fix_type, lat, lon, alt, eph, epv, vel, cog, satellites_visible, dgps_numch, dgps_age, force_mavlink1=False):
'''
Second GPS data. Coordinate frame is right-handed, Z-axis up (GPS
frame).
time_usec : Time... |
Power supply status
Vcc : 5V rail voltage in millivolts (uint16_t)
Vservo : servo rail voltage in millivolts (uint16_t)
flags : power supply status flags (see MAV_POWER_STATUS enum) (uint16_t) | def power_status_send(self, Vcc, Vservo, flags, force_mavlink1=False):
'''
Power supply status
Vcc : 5V rail voltage in millivolts (uint16_t)
Vservo : servo rail voltage in millivolts (uint16_t)
fla... |
Control a serial port. This can be used for raw access to an onboard
serial peripheral such as a GPS or telemetry radio. It
is designed to make it possible to update the devices
firmware via MAVLink messages or change the devices
settings. A message with z... | def serial_control_encode(self, device, flags, timeout, baudrate, count, data):
'''
Control a serial port. This can be used for raw access to an onboard
serial peripheral such as a GPS or telemetry radio. It
is designed to make it possible to update the de... |
Control a serial port. This can be used for raw access to an onboard
serial peripheral such as a GPS or telemetry radio. It
is designed to make it possible to update the devices
firmware via MAVLink messages or change the devices
settings. A message with z... | def serial_control_send(self, device, flags, timeout, baudrate, count, data, force_mavlink1=False):
'''
Control a serial port. This can be used for raw access to an onboard
serial peripheral such as a GPS or telemetry radio. It
is designed to make it possi... |
RTK GPS data. Gives information on the relative baseline calculation
the GPS is reporting
time_last_baseline_ms : Time since boot of last baseline message received in ms. (uint32_t)
rtk_receiver_id : Identification of connected RTK receiver. (uint8_t)
... | def gps_rtk_encode(self, time_last_baseline_ms, rtk_receiver_id, wn, tow, rtk_health, rtk_rate, nsats, baseline_coords_type, baseline_a_mm, baseline_b_mm, baseline_c_mm, accuracy, iar_num_hypotheses):
'''
RTK GPS data. Gives information on the relative baseline calculation
... |
RTK GPS data. Gives information on the relative baseline calculation
the GPS is reporting
time_last_baseline_ms : Time since boot of last baseline message received in ms. (uint32_t)
rtk_receiver_id : Identification of connected RTK receiver. (uint8_t)
... | def gps_rtk_send(self, time_last_baseline_ms, rtk_receiver_id, wn, tow, rtk_health, rtk_rate, nsats, baseline_coords_type, baseline_a_mm, baseline_b_mm, baseline_c_mm, accuracy, iar_num_hypotheses, force_mavlink1=False):
'''
RTK GPS data. Gives information on the relative baseline calcul... |
RTK GPS data. Gives information on the relative baseline calculation
the GPS is reporting
time_last_baseline_ms : Time since boot of last baseline message received in ms. (uint32_t)
rtk_receiver_id : Identification of connected RTK receiver. (uint8_t)
... | def gps2_rtk_encode(self, time_last_baseline_ms, rtk_receiver_id, wn, tow, rtk_health, rtk_rate, nsats, baseline_coords_type, baseline_a_mm, baseline_b_mm, baseline_c_mm, accuracy, iar_num_hypotheses):
'''
RTK GPS data. Gives information on the relative baseline calculation
... |
The RAW IMU readings for 3rd 9DOF sensor setup. This message should
contain the scaled values to the described units
time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t)
xacc : X acceleration (mg) (int16_t)
... | def scaled_imu3_encode(self, time_boot_ms, xacc, yacc, zacc, xgyro, ygyro, zgyro, xmag, ymag, zmag):
'''
The RAW IMU readings for 3rd 9DOF sensor setup. This message should
contain the scaled values to the described units
time_boot_ms : Times... |
The RAW IMU readings for 3rd 9DOF sensor setup. This message should
contain the scaled values to the described units
time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t)
xacc : X acceleration (mg) (int16_t)
... | def scaled_imu3_send(self, time_boot_ms, xacc, yacc, zacc, xgyro, ygyro, zgyro, xmag, ymag, zmag, force_mavlink1=False):
'''
The RAW IMU readings for 3rd 9DOF sensor setup. This message should
contain the scaled values to the described units
time_boot_ms ... |
Request for terrain data and terrain status
lat : Latitude of SW corner of first grid (degrees *10^7) (int32_t)
lon : Longitude of SW corner of first grid (in degrees *10^7) (int32_t)
grid_spacing : Grid spacing in... | def terrain_request_encode(self, lat, lon, grid_spacing, mask):
'''
Request for terrain data and terrain status
lat : Latitude of SW corner of first grid (degrees *10^7) (int32_t)
lon : Longitude of SW corner of... |
Request for terrain data and terrain status
lat : Latitude of SW corner of first grid (degrees *10^7) (int32_t)
lon : Longitude of SW corner of first grid (in degrees *10^7) (int32_t)
grid_spacing : Grid spacing in... | def terrain_request_send(self, lat, lon, grid_spacing, mask, force_mavlink1=False):
'''
Request for terrain data and terrain status
lat : Latitude of SW corner of first grid (degrees *10^7) (int32_t)
lon : Longi... |
Terrain data sent from GCS. The lat/lon and grid_spacing must be the
same as a lat/lon from a TERRAIN_REQUEST
lat : Latitude of SW corner of first grid (degrees *10^7) (int32_t)
lon : Longitude of SW corner of first grid (in de... | def terrain_data_encode(self, lat, lon, grid_spacing, gridbit, data):
'''
Terrain data sent from GCS. The lat/lon and grid_spacing must be the
same as a lat/lon from a TERRAIN_REQUEST
lat : Latitude of SW corner of first grid (degree... |
Terrain data sent from GCS. The lat/lon and grid_spacing must be the
same as a lat/lon from a TERRAIN_REQUEST
lat : Latitude of SW corner of first grid (degrees *10^7) (int32_t)
lon : Longitude of SW corner of first grid (in de... | def terrain_data_send(self, lat, lon, grid_spacing, gridbit, data, force_mavlink1=False):
'''
Terrain data sent from GCS. The lat/lon and grid_spacing must be the
same as a lat/lon from a TERRAIN_REQUEST
lat : Latitude of SW corner o... |
Request that the vehicle report terrain height at the given location.
Used by GCS to check if vehicle has all terrain data
needed for a mission.
lat : Latitude (degrees *10^7) (int32_t)
lon : Longitude (degrees ... | def terrain_check_send(self, lat, lon, force_mavlink1=False):
'''
Request that the vehicle report terrain height at the given location.
Used by GCS to check if vehicle has all terrain data
needed for a mission.
lat : ... |
Response from a TERRAIN_CHECK request
lat : Latitude (degrees *10^7) (int32_t)
lon : Longitude (degrees *10^7) (int32_t)
spacing : grid spacing (zero if terrain at this location unavailable) (uint16_t)
... | def terrain_report_encode(self, lat, lon, spacing, terrain_height, current_height, pending, loaded):
'''
Response from a TERRAIN_CHECK request
lat : Latitude (degrees *10^7) (int32_t)
lon : Longitude (degrees *1... |
Response from a TERRAIN_CHECK request
lat : Latitude (degrees *10^7) (int32_t)
lon : Longitude (degrees *10^7) (int32_t)
spacing : grid spacing (zero if terrain at this location unavailable) (uint16_t)
... | def terrain_report_send(self, lat, lon, spacing, terrain_height, current_height, pending, loaded, force_mavlink1=False):
'''
Response from a TERRAIN_CHECK request
lat : Latitude (degrees *10^7) (int32_t)
lon : L... |
Barometer readings for 2nd barometer
time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t)
press_abs : Absolute pressure (hectopascal) (float)
press_diff : Differential pressure 1 (hectopascal) (float)
... | def scaled_pressure2_encode(self, time_boot_ms, press_abs, press_diff, temperature):
'''
Barometer readings for 2nd barometer
time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t)
press_abs : Absolute pressure (... |
Barometer readings for 2nd barometer
time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t)
press_abs : Absolute pressure (hectopascal) (float)
press_diff : Differential pressure 1 (hectopascal) (float)
... | def scaled_pressure2_send(self, time_boot_ms, press_abs, press_diff, temperature, force_mavlink1=False):
'''
Barometer readings for 2nd barometer
time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t)
press_abs :... |
Motion capture attitude and position
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
q : Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) (float)
x : X position in meter... | def att_pos_mocap_encode(self, time_usec, q, x, y, z):
'''
Motion capture attitude and position
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
q : Attitude quaternion (w, x, y, z order, zero-rota... |
Motion capture attitude and position
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
q : Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) (float)
x : X position in meter... | def att_pos_mocap_send(self, time_usec, q, x, y, z, force_mavlink1=False):
'''
Motion capture attitude and position
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
q : Attitude quaternion (w, x, y... |
Set the vehicle attitude and body angular rates.
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
group_mlx : Actuator group. The "_mlx" indicates this is a multi-instance message and a MAVLink parser should use this field to difference ... | def set_actuator_control_target_encode(self, time_usec, group_mlx, target_system, target_component, controls):
'''
Set the vehicle attitude and body angular rates.
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
group_ml... |
Set the vehicle attitude and body angular rates.
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
group_mlx : Actuator group. The "_mlx" indicates this is a multi-instance message and a MAVLink parser should use this field to difference ... | def set_actuator_control_target_send(self, time_usec, group_mlx, target_system, target_component, controls, force_mavlink1=False):
'''
Set the vehicle attitude and body angular rates.
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
... |
Set the vehicle attitude and body angular rates.
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
group_mlx : Actuator group. The "_mlx" indicates this is a multi-instance message and a MAVLink parser should use this field to difference ... | def actuator_control_target_send(self, time_usec, group_mlx, controls, force_mavlink1=False):
'''
Set the vehicle attitude and body angular rates.
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
group_mlx ... |
The current system altitude.
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
altitude_monotonic : This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee... | def altitude_encode(self, time_usec, altitude_monotonic, altitude_amsl, altitude_local, altitude_relative, altitude_terrain, bottom_clearance):
'''
The current system altitude.
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
... |
The current system altitude.
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
altitude_monotonic : This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee... | def altitude_send(self, time_usec, altitude_monotonic, altitude_amsl, altitude_local, altitude_relative, altitude_terrain, bottom_clearance, force_mavlink1=False):
'''
The current system altitude.
time_usec : Timestamp (micros since boot or Unix epoch) (u... |
The autopilot is requesting a resource (file, binary, other type of
data)
request_id : Request ID. This ID should be re-used when sending back URI contents (uint8_t)
uri_type : The type of requested URI. 0 = a file via URL. 1 = a UAVCAN bi... | def resource_request_encode(self, request_id, uri_type, uri, transfer_type, storage):
'''
The autopilot is requesting a resource (file, binary, other type of
data)
request_id : Request ID. This ID should be re-used when sending back URI con... |
The autopilot is requesting a resource (file, binary, other type of
data)
request_id : Request ID. This ID should be re-used when sending back URI contents (uint8_t)
uri_type : The type of requested URI. 0 = a file via URL. 1 = a UAVCAN bi... | def resource_request_send(self, request_id, uri_type, uri, transfer_type, storage, force_mavlink1=False):
'''
The autopilot is requesting a resource (file, binary, other type of
data)
request_id : Request ID. This ID should be re-used when ... |
Barometer readings for 3rd barometer
time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t)
press_abs : Absolute pressure (hectopascal) (float)
press_diff : Differential pressure 1 (hectopascal) (float)
... | def scaled_pressure3_encode(self, time_boot_ms, press_abs, press_diff, temperature):
'''
Barometer readings for 3rd barometer
time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t)
press_abs : Absolute pressure (... |
Barometer readings for 3rd barometer
time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t)
press_abs : Absolute pressure (hectopascal) (float)
press_diff : Differential pressure 1 (hectopascal) (float)
... | def scaled_pressure3_send(self, time_boot_ms, press_abs, press_diff, temperature, force_mavlink1=False):
'''
Barometer readings for 3rd barometer
time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t)
press_abs :... |
current motion information from a designated system
timestamp : Timestamp in milliseconds since system boot (uint64_t)
est_capabilities : bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3) (uint8_t)
la... | def follow_target_encode(self, timestamp, est_capabilities, lat, lon, alt, vel, acc, attitude_q, rates, position_cov, custom_state):
'''
current motion information from a designated system
timestamp : Timestamp in milliseconds since system boot (uint64_t)... |
current motion information from a designated system
timestamp : Timestamp in milliseconds since system boot (uint64_t)
est_capabilities : bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3) (uint8_t)
la... | def follow_target_send(self, timestamp, est_capabilities, lat, lon, alt, vel, acc, attitude_q, rates, position_cov, custom_state, force_mavlink1=False):
'''
current motion information from a designated system
timestamp : Timestamp in milliseconds since sy... |
The smoothed, monotonic system state used to feed the control loops of
the system.
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
x_acc : X acceleration in body frame (float)
y_acc ... | def control_system_state_encode(self, time_usec, x_acc, y_acc, z_acc, x_vel, y_vel, z_vel, x_pos, y_pos, z_pos, airspeed, vel_variance, pos_variance, q, roll_rate, pitch_rate, yaw_rate):
'''
The smoothed, monotonic system state used to feed the control loops of
the system... |
The smoothed, monotonic system state used to feed the control loops of
the system.
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
x_acc : X acceleration in body frame (float)
y_acc ... | def control_system_state_send(self, time_usec, x_acc, y_acc, z_acc, x_vel, y_vel, z_vel, x_pos, y_pos, z_pos, airspeed, vel_variance, pos_variance, q, roll_rate, pitch_rate, yaw_rate, force_mavlink1=False):
'''
The smoothed, monotonic system state used to feed the control loops of
... |
Battery information
id : Battery ID (uint8_t)
battery_function : Function of the battery (uint8_t)
type : Type (chemistry) of the battery (uint8_t)
temperature : Temperature of the battery... | def battery_status_encode(self, id, battery_function, type, temperature, voltages, current_battery, current_consumed, energy_consumed, battery_remaining):
'''
Battery information
id : Battery ID (uint8_t)
battery_function :... |
Battery information
id : Battery ID (uint8_t)
battery_function : Function of the battery (uint8_t)
type : Type (chemistry) of the battery (uint8_t)
temperature : Temperature of the battery... | def battery_status_send(self, id, battery_function, type, temperature, voltages, current_battery, current_consumed, energy_consumed, battery_remaining, force_mavlink1=False):
'''
Battery information
id : Battery ID (uint8_t)
battery... |
Version and capability of autopilot software
capabilities : bitmask of capabilities (see MAV_PROTOCOL_CAPABILITY enum) (uint64_t)
flight_sw_version : Firmware version number (uint32_t)
middleware_sw_version : Middleware version number (uint32_... | def autopilot_version_encode(self, capabilities, flight_sw_version, middleware_sw_version, os_sw_version, board_version, flight_custom_version, middleware_custom_version, os_custom_version, vendor_id, product_id, uid):
'''
Version and capability of autopilot software
cap... |
Version and capability of autopilot software
capabilities : bitmask of capabilities (see MAV_PROTOCOL_CAPABILITY enum) (uint64_t)
flight_sw_version : Firmware version number (uint32_t)
middleware_sw_version : Middleware version number (uint32_... | def autopilot_version_send(self, capabilities, flight_sw_version, middleware_sw_version, os_sw_version, board_version, flight_custom_version, middleware_custom_version, os_custom_version, vendor_id, product_id, uid, force_mavlink1=False):
'''
Version and capability of autopilot software
... |
The location of a landing area captured from a downward facing camera
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
target_num : The ID of the target if multiple targets are present (uint8_t)
frame :... | def landing_target_encode(self, time_usec, target_num, frame, angle_x, angle_y, distance, size_x, size_y):
'''
The location of a landing area captured from a downward facing camera
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
... |
The location of a landing area captured from a downward facing camera
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
target_num : The ID of the target if multiple targets are present (uint8_t)
frame :... | def landing_target_send(self, time_usec, target_num, frame, angle_x, angle_y, distance, size_x, size_y, force_mavlink1=False):
'''
The location of a landing area captured from a downward facing camera
time_usec : Timestamp (micros since boot or Unix epoch... |
Estimator status message including flags, innovation test ratios and
estimated accuracies. The flags message is an integer
bitmask containing information on which EKF outputs
are valid. See the ESTIMATOR_STATUS_FLAGS enum
definition for further information... | def estimator_status_encode(self, time_usec, flags, vel_ratio, pos_horiz_ratio, pos_vert_ratio, mag_ratio, hagl_ratio, tas_ratio, pos_horiz_accuracy, pos_vert_accuracy):
'''
Estimator status message including flags, innovation test ratios and
estimated accuracies. The fla... |
Estimator status message including flags, innovation test ratios and
estimated accuracies. The flags message is an integer
bitmask containing information on which EKF outputs
are valid. See the ESTIMATOR_STATUS_FLAGS enum
definition for further information... | def estimator_status_send(self, time_usec, flags, vel_ratio, pos_horiz_ratio, pos_vert_ratio, mag_ratio, hagl_ratio, tas_ratio, pos_horiz_accuracy, pos_vert_accuracy, force_mavlink1=False):
'''
Estimator status message including flags, innovation test ratios and
estimated... |
GPS sensor input message. This is a raw sensor value sent by the GPS.
This is NOT the global position estimate of the sytem.
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
gps_id : ID of the GPS for multiple GPS inp... | def gps_input_encode(self, time_usec, gps_id, ignore_flags, time_week_ms, time_week, fix_type, lat, lon, alt, hdop, vdop, vn, ve, vd, speed_accuracy, horiz_accuracy, vert_accuracy, satellites_visible):
'''
GPS sensor input message. This is a raw sensor value sent by the GPS.
... |
WORK IN PROGRESS! RTCM message for injecting into the onboard GPS
(used for DGPS)
flags : LSB: 1 means message is fragmented (uint8_t)
len : data length (uint8_t)
data : RTCM message (may be f... | def gps_rtcm_data_send(self, flags, len, data, force_mavlink1=False):
'''
WORK IN PROGRESS! RTCM message for injecting into the onboard GPS
(used for DGPS)
flags : LSB: 1 means message is fragmented (uint8_t)
len ... |
Vibration levels and accelerometer clipping
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
vibration_x : Vibration levels on X-axis (float)
vibration_y : Vibration levels on Y-axis (float)
vi... | def vibration_encode(self, time_usec, vibration_x, vibration_y, vibration_z, clipping_0, clipping_1, clipping_2):
'''
Vibration levels and accelerometer clipping
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
vibration_... |
Vibration levels and accelerometer clipping
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
vibration_x : Vibration levels on X-axis (float)
vibration_y : Vibration levels on Y-axis (float)
vi... | def vibration_send(self, time_usec, vibration_x, vibration_y, vibration_z, clipping_0, clipping_1, clipping_2, force_mavlink1=False):
'''
Vibration levels and accelerometer clipping
time_usec : Timestamp (micros since boot or Unix epoch) (uint64_t)
... |
This message can be requested by sending the MAV_CMD_GET_HOME_POSITION
command. The position the system will return to and
land on. The position is set automatically by the
system during the takeoff in case it was not
explicitely set by the operator before... | def home_position_encode(self, latitude, longitude, altitude, x, y, z, q, approach_x, approach_y, approach_z):
'''
This message can be requested by sending the MAV_CMD_GET_HOME_POSITION
command. The position the system will return to and
land on. The posit... |
This message can be requested by sending the MAV_CMD_GET_HOME_POSITION
command. The position the system will return to and
land on. The position is set automatically by the
system during the takeoff in case it was not
explicitely set by the operator before... | def home_position_send(self, latitude, longitude, altitude, x, y, z, q, approach_x, approach_y, approach_z, force_mavlink1=False):
'''
This message can be requested by sending the MAV_CMD_GET_HOME_POSITION
command. The position the system will return to and
... |
The position the system will return to and land on. The position is
set automatically by the system during the takeoff in
case it was not explicitely set by the operator before
or after. The global and local positions encode the
position in the respective ... | def set_home_position_encode(self, target_system, latitude, longitude, altitude, x, y, z, q, approach_x, approach_y, approach_z):
'''
The position the system will return to and land on. The position is
set automatically by the system during the takeoff in
... |
The position the system will return to and land on. The position is
set automatically by the system during the takeoff in
case it was not explicitely set by the operator before
or after. The global and local positions encode the
position in the respective ... | def set_home_position_send(self, target_system, latitude, longitude, altitude, x, y, z, q, approach_x, approach_y, approach_z, force_mavlink1=False):
'''
The position the system will return to and land on. The position is
set automatically by the system during the takeoff... |
This interface replaces DATA_STREAM
message_id : The ID of the requested MAVLink message. v1.0 is limited to 254 messages. (uint16_t)
interval_us : The interval between two messages, in microseconds. A value of -1 indicates this stream is disabled, 0 indicat... | def message_interval_send(self, message_id, interval_us, force_mavlink1=False):
'''
This interface replaces DATA_STREAM
message_id : The ID of the requested MAVLink message. v1.0 is limited to 254 messages. (uint16_t)
interval_us ... |
Provides state for additional features
vtol_state : The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration. (uint8_t)
landed_state : The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknow... | def extended_sys_state_send(self, vtol_state, landed_state, force_mavlink1=False):
'''
Provides state for additional features
vtol_state : The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration. (uint8_t)
... |
The location and information of an ADSB vehicle
ICAO_address : ICAO address (uint32_t)
lat : Latitude, expressed as degrees * 1E7 (int32_t)
lon : Longitude, expressed as degrees * 1E7 (int32_t)
alti... | def adsb_vehicle_encode(self, ICAO_address, lat, lon, altitude_type, altitude, heading, hor_velocity, ver_velocity, callsign, emitter_type, tslc, flags, squawk):
'''
The location and information of an ADSB vehicle
ICAO_address : ICAO address (uint32_t)
... |
The location and information of an ADSB vehicle
ICAO_address : ICAO address (uint32_t)
lat : Latitude, expressed as degrees * 1E7 (int32_t)
lon : Longitude, expressed as degrees * 1E7 (int32_t)
alti... | def adsb_vehicle_send(self, ICAO_address, lat, lon, altitude_type, altitude, heading, hor_velocity, ver_velocity, callsign, emitter_type, tslc, flags, squawk, force_mavlink1=False):
'''
The location and information of an ADSB vehicle
ICAO_address : ICAO addr... |
Information about a potential collision
src : Collision data source (uint8_t)
id : Unique identifier, domain based on src field (uint32_t)
action : Action that is being taken to avoid this collision (uint8_t... | def collision_encode(self, src, id, action, threat_level, time_to_minimum_delta, altitude_minimum_delta, horizontal_minimum_delta):
'''
Information about a potential collision
src : Collision data source (uint8_t)
id ... |
Information about a potential collision
src : Collision data source (uint8_t)
id : Unique identifier, domain based on src field (uint32_t)
action : Action that is being taken to avoid this collision (uint8_t... | def collision_send(self, src, id, action, threat_level, time_to_minimum_delta, altitude_minimum_delta, horizontal_minimum_delta, force_mavlink1=False):
'''
Information about a potential collision
src : Collision data source (uint8_t)
... |
Message implementing parts of the V2 payload specs in V1 frames for
transitional support.
target_network : Network ID (0 for broadcast) (uint8_t)
target_system : System ID (0 for broadcast) (uint8_t)
target_component : Comp... | def v2_extension_encode(self, target_network, target_system, target_component, message_type, payload):
'''
Message implementing parts of the V2 payload specs in V1 frames for
transitional support.
target_network : Network ID (0 for broadcast) (... |
Message implementing parts of the V2 payload specs in V1 frames for
transitional support.
target_network : Network ID (0 for broadcast) (uint8_t)
target_system : System ID (0 for broadcast) (uint8_t)
target_component : Comp... | def v2_extension_send(self, target_network, target_system, target_component, message_type, payload, force_mavlink1=False):
'''
Message implementing parts of the V2 payload specs in V1 frames for
transitional support.
target_network : Network ID... |
Send raw controller memory. The use of this message is discouraged for
normal packets, but a quite efficient way for testing
new messages and getting experimental debug output.
address : Starting address of the debug variables (uint16_t)
... | def memory_vect_encode(self, address, ver, type, value):
'''
Send raw controller memory. The use of this message is discouraged for
normal packets, but a quite efficient way for testing
new messages and getting experimental debug output.
a... |
Send a key-value pair as float. The use of this message is discouraged
for normal packets, but a quite efficient way for
testing new messages and getting experimental debug
output.
time_boot_ms : Timestamp (milliseconds since system boot) (ui... | def named_value_float_send(self, time_boot_ms, name, value, force_mavlink1=False):
'''
Send a key-value pair as float. The use of this message is discouraged
for normal packets, but a quite efficient way for
testing new messages and getting experimental de... |
Send raw controller memory. The use of this message is discouraged for
normal packets, but a quite efficient way for testing
new messages and getting experimental debug output.
address : Starting address of the debug variables (uint16_t)
... | def memory_vect_send(self, address, ver, type, value, force_mavlink1=False):
'''
Send raw controller memory. The use of this message is discouraged for
normal packets, but a quite efficient way for testing
new messages and getting experimental debug output... |
Send a key-value pair as integer. The use of this message is
discouraged for normal packets, but a quite efficient
way for testing new messages and getting experimental
debug output.
time_boot_ms : Timestamp (milliseconds since system boot) (... | def named_value_int_send(self, time_boot_ms, name, value, force_mavlink1=False):
'''
Send a key-value pair as integer. The use of this message is
discouraged for normal packets, but a quite efficient
way for testing new messages and getting experimental
... |
Status text message. These messages are printed in yellow in the COMM
console of QGroundControl. WARNING: They consume quite
some bandwidth, so use only for important status and
error messages. If implemented wisely, these messages
are buffered on the MCU ... | def statustext_send(self, severity, text, force_mavlink1=False):
'''
Status text message. These messages are printed in yellow in the COMM
console of QGroundControl. WARNING: They consume quite
some bandwidth, so use only for important status and
... |
Send a debug value. The index is used to discriminate between values.
These values show up in the plot of QGroundControl as
DEBUG N.
time_boot_ms : Timestamp (milliseconds since system boot) (uint32_t)
ind : index of deb... | def debug_send(self, time_boot_ms, ind, value, force_mavlink1=False):
'''
Send a debug value. The index is used to discriminate between values.
These values show up in the plot of QGroundControl as
DEBUG N.
time_boot_ms : Time... |
add in some more bytes | def accumulate_str(self, buf):
'''add in some more bytes'''
accum = self.crc
import array
bytes = array.array('B')
bytes.fromstring(buf)
self.accumulate(bytes) |
add in some more bytes | def accumulate(self, buf):
'''add in some more bytes'''
accum = self.crc
for b in buf:
tmp = b ^ (accum & 0xff)
tmp = (tmp ^ (tmp<<4)) & 0xFF
accum = (accum>>8) ^ (tmp<<8) ^ (tmp<<3) ^ (tmp>>4)
self.crc = accum |
Updates LaserData. | def update(self):
'''
Updates LaserData.
'''
if self.hasproxy():
irD = IRData()
received = 0
data = self.proxy.getIRData()
irD.received = data.received
self.lock.acquire()
self.ir = irD
self.lock.releas... |
Returns last LaserData.
@return last JdeRobotTypes LaserData saved | def getIRData(self):
'''
Returns last LaserData.
@return last JdeRobotTypes LaserData saved
'''
if self.hasproxy():
self.lock.acquire()
ir = self.ir
self.lock.release()
return ir
return None |
Function to publish cmdvel. | def publish (self):
'''
Function to publish cmdvel.
'''
self.lock.acquire()
tw = cmdvel2Twist(self.data)
self.lock.release()
self.pub.publish(tw) |
Sends CMDVel.
@param vel: CMDVel to publish
@type vel: CMDVel | def sendVelocities(self, vel):
'''
Sends CMDVel.
@param vel: CMDVel to publish
@type vel: CMDVel
'''
self.lock.acquire()
self.data = vel
self.lock.release() |
Sends VX velocity.
@param vx: VX velocity
@type vx: float | def sendVX(self, vx):
'''
Sends VX velocity.
@param vx: VX velocity
@type vx: float
'''
self.lock.acquire()
self.data.vx = vx
self.lock.release() |
Sends VY velocity.
@param vy: VY velocity
@type vy: float | def sendVY(self, vy):
'''
Sends VY velocity.
@param vy: VY velocity
@type vy: float
'''
self.lock.acquire()
self.data.vy = vy
self.lock.release() |
Sends AZ velocity.
@param az: AZ velocity
@type az: float | def sendAZ(self, az):
'''
Sends AZ velocity.
@param az: AZ velocity
@type az: float
'''
self.lock.acquire()
self.data.az = az
self.lock.release() |
Translates from ROS BumperScan to JderobotTypes BumperData.
@param event: ROS BumperScan to translate
@type event: BumperScan
@return a BumperData translated from event
# bumper
LEFT = 0
CENTER = 1
RIGHT = 2
# state
RELEASED = 0
PRESSED = 1 | def bumperEvent2BumperData(event):
'''
Translates from ROS BumperScan to JderobotTypes BumperData.
@param event: ROS BumperScan to translate
@type event: BumperScan
@return a BumperData translated from event
# bumper
LEFT = 0
CENTER = 1
RIGHT = 2
# state
RELEASED = ... |
Callback function to receive and save Bumper Scans.
@param event: ROS BumperScan received
@type event: BumperScan | def __callback (self, event):
'''
Callback function to receive and save Bumper Scans.
@param event: ROS BumperScan received
@type event: BumperScan
'''
bump = bumperEvent2BumperData(event)
if bump.state == 1:
self.lock.acquire()
... |
Starts (Subscribes) the client. | def start (self):
'''
Starts (Subscribes) the client.
'''
self.sub = rospy.Subscriber(self.topic, BumperEvent, self.__callback) |
Returns last BumperData.
@return last JdeRobotTypes BumperData saved | def getBumperData(self):
'''
Returns last BumperData.
@return last JdeRobotTypes BumperData saved
'''
self.lock.acquire()
t = current_milli_time()
if (t - self.time) > 500:
self.data.state = 0
bump = self.data
self.lock.release()
... |
show battery levels | def cmd_bat(self, args):
'''show battery levels'''
print("Flight battery: %u%%" % self.battery_level)
if self.settings.numcells != 0:
print("%.2f V/cell for %u cells - approx %u%%" % (self.per_cell,
self.settings.numcell... |
update battery level | def battery_update(self, SYS_STATUS):
'''update battery level'''
# main flight battery
self.battery_level = SYS_STATUS.battery_remaining
self.voltage_level = SYS_STATUS.voltage_battery
self.current_battery = SYS_STATUS.current_battery
if self.settings.numcells != 0:
... |
handle a mavlink packet | def mavlink_packet(self, m):
'''handle a mavlink packet'''
mtype = m.get_type()
if mtype == "SYS_STATUS":
self.battery_update(m)
if mtype == "BATTERY2":
self.battery2_voltage = m.voltage * 0.001
if mtype == "POWER_STATUS":
self.power_status_upd... |
Updates Image. | def update(self):
'''
Updates Image.
'''
if self.hasproxy():
img = Image()
imageData = self.proxy.getImageData(self.imgFormat)
img.height = imageData.description.height
img.width = imageData.description.width
img.format = imageD... |
Returns last Image.
@return last JdeRobotTypes Image saved | def getImage(self):
'''
Returns last Image.
@return last JdeRobotTypes Image saved
'''
img = Image()
if self.hasproxy():
self.lock.acquire()
img = self.image
self.lock.release()
return img |
do a full 3D accel calibration | def cmd_accelcal(self, args):
'''do a full 3D accel calibration'''
mav = self.master
# ack the APM to begin 3D calibration of accelerometers
mav.mav.command_long_send(mav.target_system, mav.target_component,
mavutil.mavlink.MAV_CMD_PREFLIGHT_CALIBRATION,... |
do a full gyro calibration | def cmd_gyrocal(self, args):
'''do a full gyro calibration'''
mav = self.master
mav.mav.command_long_send(mav.target_system, mav.target_component,
mavutil.mavlink.MAV_CMD_PREFLIGHT_CALIBRATION, 0,
1, 0, 0, 0, 0, 0, 0) |
handle mavlink packets | def mavlink_packet(self, m):
'''handle mavlink packets'''
if self.accelcal_count != -1:
if m.get_type() == 'STATUSTEXT':
# handle accelcal packet
text = str(m.text)
if text.startswith('Place '):
self.accelcal_wait_enter = Tr... |
handle mavlink packets | def idle_task(self):
'''handle mavlink packets'''
if self.accelcal_count != -1:
if self.accelcal_wait_enter and self.empty_input_count != self.mpstate.empty_input_count:
self.accelcal_wait_enter = False
self.accelcal_count += 1
# tell the APM t... |
do a compass/motor interference calibration | def cmd_compassmot(self, args):
'''do a compass/motor interference calibration'''
mav = self.master
print("compassmot starting")
mav.mav.command_long_send(mav.target_system, mav.target_component,
mavutil.mavlink.MAV_CMD_PREFLIGHT_CALIBRATION, 0,
... |
control magnetometer calibration | def cmd_magcal(self, args):
'''control magnetometer calibration'''
if len(args) < 1:
print("Usage: magcal <start|accept|cancel>")
return
if args[0] == 'start':
self.master.mav.command_long_send(
self.settings.target_system, # target_system
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.