TSC21
7 years ago
committed by
Beat Küng
7 changed files with 377 additions and 115 deletions
@ -0,0 +1,352 @@
@@ -0,0 +1,352 @@
|
||||
{ |
||||
"rtps": [ |
||||
{ |
||||
"msg": "actuator_armed", |
||||
"id": 1 |
||||
}, |
||||
{ |
||||
"msg": "actuator_controls", |
||||
"id": 2 |
||||
}, |
||||
{ |
||||
"msg": "actuator_direct", |
||||
"id": 3 |
||||
}, |
||||
{ |
||||
"msg": "actuator_outputs", |
||||
"id": 4 |
||||
}, |
||||
{ |
||||
"msg": "adc_report", |
||||
"id": 5 |
||||
}, |
||||
{ |
||||
"msg": "airspeed", |
||||
"id": 6 |
||||
}, |
||||
{ |
||||
"msg": "att_pos_mocap", |
||||
"id": 7 |
||||
}, |
||||
{ |
||||
"msg": "battery_status", |
||||
"id": 8 |
||||
}, |
||||
{ |
||||
"msg": "camera_capture", |
||||
"id": 9 |
||||
}, |
||||
{ |
||||
"msg": "camera_trigger", |
||||
"id": 10 |
||||
}, |
||||
{ |
||||
"msg": "collision_report", |
||||
"id": 11 |
||||
}, |
||||
{ |
||||
"msg": "commander_state", |
||||
"id": 12 |
||||
}, |
||||
{ |
||||
"msg": "cpuload", |
||||
"id": 14 |
||||
}, |
||||
{ |
||||
"msg": "debug_key_value", |
||||
"id": 15 |
||||
}, |
||||
{ |
||||
"msg": "differential_pressure", |
||||
"id": 16 |
||||
}, |
||||
{ |
||||
"msg": "distance_sensor", |
||||
"id": 17 |
||||
}, |
||||
{ |
||||
"msg": "ekf2_innovations", |
||||
"id": 18 |
||||
}, |
||||
{ |
||||
"msg": "ekf2_timestamps", |
||||
"id": 20 |
||||
}, |
||||
{ |
||||
"msg": "esc_report", |
||||
"id": 21 |
||||
}, |
||||
{ |
||||
"msg": "esc_status", |
||||
"id": 22 |
||||
}, |
||||
{ |
||||
"msg": "estimator_status", |
||||
"id": 23 |
||||
}, |
||||
{ |
||||
"msg": "fence", |
||||
"id": 24 |
||||
}, |
||||
{ |
||||
"msg": "fence_vertex", |
||||
"id": 25 |
||||
}, |
||||
{ |
||||
"msg": "follow_target", |
||||
"id": 27 |
||||
}, |
||||
{ |
||||
"msg": "fw_pos_ctrl_status", |
||||
"id": 28 |
||||
}, |
||||
{ |
||||
"msg": "geofence_result", |
||||
"id": 29 |
||||
}, |
||||
{ |
||||
"msg": "gps_dump", |
||||
"id": 30 |
||||
}, |
||||
{ |
||||
"msg": "gps_inject_data", |
||||
"id": 31 |
||||
}, |
||||
{ |
||||
"msg": "home_position", |
||||
"id": 33 |
||||
}, |
||||
{ |
||||
"msg": "input_rc", |
||||
"id": 34 |
||||
}, |
||||
{ |
||||
"msg": "led_control", |
||||
"id": 35 |
||||
}, |
||||
{ |
||||
"msg": "log_message", |
||||
"id": 36 |
||||
}, |
||||
{ |
||||
"msg": "manual_control_setpoint", |
||||
"id": 37 |
||||
}, |
||||
{ |
||||
"msg": "mavlink_log", |
||||
"id": 38 |
||||
}, |
||||
{ |
||||
"msg": "mc_att_ctrl_status", |
||||
"id": 39 |
||||
}, |
||||
{ |
||||
"msg": "mission", |
||||
"id": 40 |
||||
}, |
||||
{ |
||||
"msg": "mission_result", |
||||
"id": 41 |
||||
}, |
||||
{ |
||||
"msg": "mount_orientation", |
||||
"id": 42 |
||||
}, |
||||
{ |
||||
"msg": "multirotor_motor_limits", |
||||
"id": 43 |
||||
}, |
||||
{ |
||||
"msg": "offboard_control_mode", |
||||
"id": 44 |
||||
}, |
||||
{ |
||||
"msg": "optical_flow", |
||||
"id": 45 |
||||
}, |
||||
{ |
||||
"msg": "parameter_update", |
||||
"id": 47 |
||||
}, |
||||
{ |
||||
"msg": "position_setpoint", |
||||
"id": 48 |
||||
}, |
||||
{ |
||||
"msg": "position_setpoint_triplet", |
||||
"id": 49 |
||||
}, |
||||
{ |
||||
"msg": "pwm_input", |
||||
"id": 40 |
||||
}, |
||||
{ |
||||
"msg": "qshell_req", |
||||
"id": 51 |
||||
}, |
||||
{ |
||||
"msg": "rc_channels", |
||||
"id": 52 |
||||
}, |
||||
{ |
||||
"msg": "rc_parameter_map", |
||||
"id": 53 |
||||
}, |
||||
{ |
||||
"msg": "safety", |
||||
"id": 54 |
||||
}, |
||||
{ |
||||
"msg": "satellite_info", |
||||
"id": 55 |
||||
}, |
||||
{ |
||||
"msg": "sensor_accel", |
||||
"id": 56 |
||||
}, |
||||
{ |
||||
"msg": "sensor_baro", |
||||
"id": 57 |
||||
}, |
||||
{ |
||||
"msg": "sensor_combined", |
||||
"id": 58 |
||||
}, |
||||
{ |
||||
"msg": "sensor_correction", |
||||
"id": 59 |
||||
}, |
||||
{ |
||||
"msg": "sensor_gyro", |
||||
"id": 60 |
||||
}, |
||||
{ |
||||
"msg": "sensor_mag", |
||||
"id": 61 |
||||
}, |
||||
{ |
||||
"msg": "sensor_preflight", |
||||
"id": 62 |
||||
}, |
||||
{ |
||||
"msg": "sensor_selection", |
||||
"id": 63 |
||||
}, |
||||
{ |
||||
"msg": "servorail_status", |
||||
"id": 64 |
||||
}, |
||||
{ |
||||
"msg": "subsystem_info", |
||||
"id": 65 |
||||
}, |
||||
{ |
||||
"msg": "system_power", |
||||
"id": 66 |
||||
}, |
||||
{ |
||||
"msg": "task_stack_info", |
||||
"id": 67 |
||||
}, |
||||
{ |
||||
"msg": "tecs_status", |
||||
"id": 68 |
||||
}, |
||||
{ |
||||
"msg": "telemetry_status", |
||||
"id": 69 |
||||
}, |
||||
{ |
||||
"msg": "test_motor", |
||||
"id": 70 |
||||
}, |
||||
{ |
||||
"msg": "time_offset", |
||||
"id": 71 |
||||
}, |
||||
{ |
||||
"msg": "transponder_report", |
||||
"id": 72 |
||||
}, |
||||
{ |
||||
"msg": "uavcan_parameter_request", |
||||
"id": 73 |
||||
}, |
||||
{ |
||||
"msg": "uavcan_parameter_value", |
||||
"id": 74 |
||||
}, |
||||
{ |
||||
"msg": "ulog_stream_ack", |
||||
"id": 75 |
||||
}, |
||||
{ |
||||
"msg": "ulog_stream", |
||||
"id": 76 |
||||
}, |
||||
{ |
||||
"msg": "vehicle_attitude", |
||||
"id": 77 |
||||
}, |
||||
{ |
||||
"msg": "vehicle_attitude_setpoint", |
||||
"id": 78 |
||||
}, |
||||
{ |
||||
"msg": "vehicle_command_ack", |
||||
"id": 79 |
||||
}, |
||||
{ |
||||
"msg": "vehicle_command", |
||||
"id": 80 |
||||
}, |
||||
{ |
||||
"msg": "vehicle_control_mode", |
||||
"id": 81 |
||||
}, |
||||
{ |
||||
"msg": "vehicle_global_position", |
||||
"id": 83 |
||||
}, |
||||
{ |
||||
"msg": "vehicle_gps_position", |
||||
"id": 85 |
||||
}, |
||||
{ |
||||
"msg": "vehicle_land_detected", |
||||
"id": 86 |
||||
}, |
||||
{ |
||||
"msg": "vehicle_local_position", |
||||
"id": 87 |
||||
}, |
||||
{ |
||||
"msg": "vehicle_local_position_setpoint", |
||||
"id": 88 |
||||
}, |
||||
{ |
||||
"msg": "vehicle_rates_setpoint", |
||||
"id": 89 |
||||
}, |
||||
{ |
||||
"msg": "vehicle_roi", |
||||
"id": 90 |
||||
}, |
||||
{ |
||||
"msg": "vehicle_status_flags", |
||||
"id": 91 |
||||
}, |
||||
{ |
||||
"msg": "vehicle_status", |
||||
"id": 92 |
||||
}, |
||||
{ |
||||
"msg": "vtol_vehicle_status", |
||||
"id": 93 |
||||
}, |
||||
{ |
||||
"msg": "wind_estimate", |
||||
"id": 94 |
||||
} |
||||
] |
||||
} |
@ -1,108 +0,0 @@
@@ -1,108 +0,0 @@
|
||||
|
||||
# Message identification constants |
||||
|
||||
|
||||
msg_id_map = { |
||||
'actuator_armed': 1, |
||||
'actuator_controls': 2, |
||||
'actuator_direct': 3, |
||||
'actuator_outputs': 4, |
||||
'adc_report': 5, |
||||
'airspeed': 6, |
||||
'att_pos_mocap': 7, |
||||
'battery_status': 8, |
||||
'camera_capture': 9, |
||||
'camera_trigger': 10, |
||||
'collision_report': 11, |
||||
'commander_state': 12, |
||||
|
||||
'cpuload': 14, |
||||
'debug_key_value': 15, |
||||
'differential_pressure': 16, |
||||
'distance_sensor': 17, |
||||
'ekf2_innovations': 18, |
||||
|
||||
'ekf2_timestamps': 20, |
||||
'esc_report': 21, |
||||
'esc_status': 22, |
||||
'estimator_status': 23, |
||||
'fence': 24, |
||||
'fence_vertex': 25, |
||||
|
||||
'follow_target': 27, |
||||
'fw_pos_ctrl_status': 28, |
||||
'geofence_result': 29, |
||||
'gps_dump': 30, |
||||
'gps_inject_data': 31, |
||||
|
||||
'home_position': 33, |
||||
'input_rc': 34, |
||||
'led_control': 35, |
||||
'log_message': 36, |
||||
'manual_control_setpoint': 37, |
||||
'mavlink_log': 38, |
||||
'mc_att_ctrl_status': 39, |
||||
'mission': 40, |
||||
'mission_result': 41, |
||||
'mount_orientation': 42, |
||||
'multirotor_motor_limits': 43, |
||||
'offboard_control_mode': 44, |
||||
'optical_flow': 45, |
||||
|
||||
'parameter_update': 47, |
||||
'position_setpoint': 48, |
||||
'position_setpoint_triplet': 49, |
||||
'pwm_input': 50, |
||||
'qshell_req': 51, |
||||
'rc_channels': 52, |
||||
'rc_parameter_map': 53, |
||||
'safety': 54, |
||||
'satellite_info': 55, |
||||
'sensor_accel': 56, |
||||
'sensor_baro': 57, |
||||
'sensor_combined': 58, |
||||
'sensor_correction': 59, |
||||
'sensor_gyro': 60, |
||||
'sensor_mag': 61, |
||||
'sensor_preflight': 62, |
||||
'sensor_selection': 63, |
||||
'servorail_status': 64, |
||||
'subsystem_info': 65, |
||||
'system_power': 66, |
||||
'task_stack_info': 67, |
||||
'tecs_status': 68, |
||||
'telemetry_status': 69, |
||||
'test_motor': 70, |
||||
'time_offset': 71, |
||||
'transponder_report': 72, |
||||
'uavcan_parameter_request': 73, |
||||
'uavcan_parameter_value': 74, |
||||
'ulog_stream_ack': 75, |
||||
'ulog_stream': 76, |
||||
'vehicle_attitude': 77, |
||||
'vehicle_attitude_setpoint': 78, |
||||
'vehicle_command_ack': 79, |
||||
'vehicle_command': 80, |
||||
'vehicle_control_mode': 81, |
||||
|
||||
'vehicle_global_position': 83, |
||||
|
||||
'vehicle_gps_position': 85, |
||||
'vehicle_land_detected': 86, |
||||
'vehicle_local_position': 87, |
||||
'vehicle_local_position_setpoint': 88, |
||||
'vehicle_rates_setpoint': 89, |
||||
'vehicle_roi': 90, |
||||
'vehicle_status_flags': 91, |
||||
'vehicle_status': 92, |
||||
'vtol_vehicle_status': 93, |
||||
'wind_estimate': 94, |
||||
} |
||||
|
||||
def message_id(message): |
||||
""" |
||||
Get id of a message |
||||
""" |
||||
if message in msg_id_map: |
||||
return msg_id_map[message] |
||||
return 0 |
Loading…
Reference in new issue