Closed enderocean closed 3 years ago
Hi,
How are you getting AHRS3 ? This message is not sent by SITL by default. Do you have EKF3 enabled in SITL ? You can try to enable that in your ROV. But, there are others attitude messages such as ATTITUDE and AHRS2 that you can use.
Here is the flow provided by mavlink2rest in autotest mode :
{"AHRS":{"accel_weight":0.0,"error_rp":0.0025952341966331005,"error_yaw":0.001920149428769946,"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.431172990+01:00","last_message":"2021-02-24T17:01:23.783130452+01:00"}},"omegaIx":-0.0004362220352049917,"omegaIy":-0.00036959859426133335,"omegaIz":-0.0005507777677848935,"renorm_val":0.0,"type":"AHRS"},"AHRS2":{"altitude":0.0,"lat":0,"lng":0,"message_information":{"counter":221,"frequency":4.018181800842285,"time":{"first_message":"2021-02-24T17:00:28.133524653+01:00","last_message":"2021-02-24T17:01:23.783578093+01:00"}},"pitch":0.001758397906087339,"roll":0.0019166297279298306,"type":"AHRS2","yaw":-1.566870927810669},"AHRS3":{"altitude":-0.17999999225139618,"lat":338103130,"lng":-1183938670,"message_information":{"counter":223,"frequency":3.982142925262451,"time":{"first_message":"2021-02-24T17:00:27.547465110+01:00","last_message":"2021-02-24T17:01:23.783793479+01:00"}},"pitch":0.0023309793323278427,"roll":0.0024154323618859053,"type":"AHRS3","v1":0.0,"v2":0.0,"v3":0.0,"v4":0.0,"yaw":-1.5667086839675903},"ATTITUDE":{"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.420496730+01:00","last_message":"2021-02-24T17:01:23.776817101+01:00"}},"pitch":0.0023309793323278427,"pitchspeed":0.0005453334888443351,"roll":0.0024154323618859053,"rollspeed":0.00040633100434206426,"time_boot_ms":58348,"type":"ATTITUDE","yaw":-1.5667086839675903,"yawspeed":0.0003865770995616913},"BATTERY_STATUS":{"battery_function":{"type":"MAV_BATTERY_FUNCTION_UNKNOWN"},"battery_remaining":99,"charge_state":{"type":"MAV_BATTERY_CHARGE_STATE_UNDEFINED"},"current_battery":0,"current_consumed":22,"energy_consumed":7,"id":0,"mavtype":{"type":"MAV_BATTERY_TYPE_UNKNOWN"},"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.433095093+01:00","last_message":"2021-02-24T17:01:23.785413608+01:00"}},"temperature":32767,"time_remaining":0,"type":"BATTERY_STATUS","voltages":[12587,65535,65535,65535,65535,65535,65535,65535,65535,65535]},"DISTANCE_SENSOR":{"covariance":0,"current_distance":0,"horizontal_fov":0.0,"id":0,"mavtype":{"type":"MAV_DISTANCE_SENSOR_UNKNOWN"},"max_distance":700,"message_information":{"counter":2,"frequency":null,"time":{"first_message":"2021-02-24T17:00:26.432454017+01:00","last_message":"2021-02-24T17:00:26.726191645+01:00"}},"min_distance":20,"orientation":{"type":"MAV_SENSOR_ROTATION_PITCH_270"},"quaternion":[0.0,0.0,0.0,0.0],"signal_quality":0,"time_boot_ms":2098,"type":"DISTANCE_SENSOR","vertical_fov":0.0},"EKF_STATUS_REPORT":{"airspeed_variance":0.0,"compass_variance":0.0015877227997407317,"flags":{"bits":895},"message_information":{"counter":223,"frequency":3.982142925262451,"time":{"first_message":"2021-02-24T17:00:27.550033578+01:00","last_message":"2021-02-24T17:01:23.784580696+01:00"}},"pos_horiz_variance":0.0008397054043598473,"pos_vert_variance":0.34894177317619324,"terrain_alt_variance":0.0,"type":"EKF_STATUS_REPORT","velocity_variance":0.014957706443965435},"GLOBAL_POSITION_INT":{"alt":-180,"hdg":27024,"lat":338103130,"lon":-1183938670,"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.423339689+01:00","last_message":"2021-02-24T17:01:23.777505739+01:00"}},"relative_alt":-72,"time_boot_ms":58348,"type":"GLOBAL_POSITION_INT","vx":1,"vy":2,"vz":-13},"GPS_GLOBAL_ORIGIN":{"altitude":-20,"latitude":338103130,"longitude":-1183938670,"message_information":{"counter":1,"frequency":null,"time":{"first_message":"2021-02-24T17:00:38.225659826+01:00","last_message":"2021-02-24T17:00:38.225664342+01:00"}},"time_usec":12823202,"type":"GPS_GLOBAL_ORIGIN"},"GPS_RAW_INT":{"alt":-280,"alt_ellipsoid":0,"cog":0,"eph":121,"epv":200,"fix_type":{"type":"GPS_FIX_TYPE_RTK_FIXED"},"h_acc":200,"hdg_acc":0,"lat":338103130,"lon":-1183938670,"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.429803216+01:00","last_message":"2021-02-24T17:01:23.782497888+01:00"}},"satellites_visible":10,"time_usec":58177000,"type":"GPS_RAW_INT","v_acc":200,"vel":0,"vel_acc":40,"yaw":0},"HEARTBEAT":{"autopilot":{"type":"MAV_AUTOPILOT_ARDUPILOTMEGA"},"base_mode":{"bits":81},"custom_mode":19,"mavlink_version":3,"mavtype":{"type":"MAV_TYPE_SUBMARINE"},"message_information":{"counter":59,"frequency":1.0350877046585083,"time":{"first_message":"2021-02-24T17:00:25.742405483+01:00","last_message":"2021-02-24T17:01:23.441211192+01:00"}},"system_status":{"type":"MAV_STATE_STANDBY"},"type":"HEARTBEAT"},"HOME_POSITION":{"altitude":-110,"approach_x":0.0,"approach_y":0.0,"approach_z":0.0,"latitude":338103130,"longitude":-1183938670,"message_information":{"counter":1,"frequency":null,"time":{"first_message":"2021-02-24T17:00:38.226441741+01:00","last_message":"2021-02-24T17:00:38.226446241+01:00"}},"q":[1.0,0.0,0.0,0.0],"time_usec":12823202,"type":"HOME_POSITION","x":0.0,"y":0.0,"z":0.0},"HWSTATUS":{"I2Cerr":0,"Vcc":5000,"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.431797017+01:00","last_message":"2021-02-24T17:01:23.784002004+01:00"}},"type":"HWSTATUS"},"LOCAL_POSITION_NED":{"message_information":{"counter":6,"frequency":6.0,"time":{"first_message":"2021-02-24T17:01:22.513656853+01:00","last_message":"2021-02-24T17:01:23.784904819+01:00"}},"time_boot_ms":58348,"type":"LOCAL_POSITION_NED","vx":0.019915131852030754,"vy":0.020827805623412132,"vz":-0.13752809166908264,"x":0.00438088271766901,"y":0.004872757010161877,"z":0.07271640747785568},"MEMINFO":{"brkval":0,"freemem":65535,"freemem32":131072,"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.425509020+01:00","last_message":"2021-02-24T17:01:23.779100555+01:00"}},"type":"MEMINFO"},"MISSION_CURRENT":{"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.426722124+01:00","last_message":"2021-02-24T17:01:23.779745737+01:00"}},"seq":0,"type":"MISSION_CURRENT"},"NAMED_VALUE_FLOAT":{"message_information":{"counter":1589,"frequency":27.877193450927734,"time":{"first_message":"2021-02-24T17:00:26.433375993+01:00","last_message":"2021-02-24T17:01:23.787022680+01:00"}},"name":["I","n","p","u","t","H","o","l","d","\u0000"],"time_boot_ms":58348,"type":"NAMED_VALUE_FLOAT","value":0.0},"NAV_CONTROLLER_OUTPUT":{"alt_error":0.16271640360355377,"aspd_error":0.0,"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.426315494+01:00","last_message":"2021-02-24T17:01:23.779327027+01:00"}},"nav_bearing":-89,"nav_pitch":0.1335553228855133,"nav_roll":0.1383940726518631,"target_bearing":228,"type":"NAV_CONTROLLER_OUTPUT","wp_dist":0,"xtrack_error":0.0},"PARAM_VALUE":{"message_information":{"counter":1073,"frequency":19.870370864868164,"time":{"first_message":"2021-02-24T17:00:25.605559809+01:00","last_message":"2021-02-24T17:01:20.238077714+01:00"}},"param_count":1062,"param_id":["G","N","D","_","A","B","S","_","P","R","E","S","S","\u0000","\u0000","\u0000"],"param_index":65535,"param_type":{"type":"MAV_PARAM_TYPE_REAL32"},"param_value":101889.8203125,"type":"PARAM_VALUE"},"POWER_STATUS":{"Vcc":5000,"Vservo":0,"flags":{"bits":0},"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.425417271+01:00","last_message":"2021-02-24T17:01:23.778755933+01:00"}},"type":"POWER_STATUS"},"RANGEFINDER":{"distance":0.0,"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.432103143+01:00","last_message":"2021-02-24T17:01:23.784270524+01:00"}},"type":"RANGEFINDER","voltage":0.0},"RAW_IMU":{"id":0,"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.427825606+01:00","last_message":"2021-02-24T17:01:23.781364170+01:00"}},"temperature":2300,"time_usec":58348318,"type":"RAW_IMU","xacc":0,"xgyro":0,"xmag":-57,"yacc":0,"ygyro":0,"ymag":237,"zacc":-1019,"zgyro":0,"zmag":402},"RC_CHANNELS":{"chan10_raw":0,"chan11_raw":0,"chan12_raw":0,"chan13_raw":0,"chan14_raw":0,"chan15_raw":0,"chan16_raw":0,"chan17_raw":0,"chan18_raw":0,"chan1_raw":1500,"chan2_raw":1500,"chan3_raw":1500,"chan4_raw":1500,"chan5_raw":1500,"chan6_raw":1500,"chan7_raw":1500,"chan8_raw":1500,"chan9_raw":0,"chancount":16,"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.427614727+01:00","last_message":"2021-02-24T17:01:23.781006164+01:00"}},"rssi":0,"time_boot_ms":58348,"type":"RC_CHANNELS"},"SCALED_IMU2":{"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.428162492+01:00","last_message":"2021-02-24T17:01:23.781601669+01:00"}},"temperature":2300,"time_boot_ms":58348,"type":"SCALED_IMU2","xacc":0,"xgyro":0,"xmag":-57,"yacc":0,"ygyro":0,"ymag":237,"zacc":-1018,"zgyro":0,"zmag":402},"SCALED_IMU3":{"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.428518223+01:00","last_message":"2021-02-24T17:01:23.781831879+01:00"}},"temperature":0,"time_boot_ms":58348,"type":"SCALED_IMU3","xacc":0,"xgyro":0,"xmag":-57,"yacc":0,"ygyro":0,"ymag":237,"zacc":0,"zgyro":0,"zmag":402},"SCALED_PRESSURE":{"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.428826964+01:00","last_message":"2021-02-24T17:01:23.782052369+01:00"}},"press_abs":1030.3404541015625,"press_diff":0.0,"temperature":2996,"time_boot_ms":58348,"type":"SCALED_PRESSURE"},"SCALED_PRESSURE3":{"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.429127448+01:00","last_message":"2021-02-24T17:01:23.782251042+01:00"}},"press_abs":0.0,"press_diff":0.0,"temperature":4242,"time_boot_ms":58348,"type":"SCALED_PRESSURE3"},"SENSOR_OFFSETS":{"accel_cal_x":0.0010000000474974513,"accel_cal_y":0.0010000000474974513,"accel_cal_z":0.0010000000474974513,"gyro_cal_x":0.0,"gyro_cal_y":0.0,"gyro_cal_z":0.0,"mag_declination":0.2361595183610916,"mag_ofs_x":5,"mag_ofs_y":13,"mag_ofs_z":-18,"message_information":{"counter":20,"frequency":0.38461539149284363,"time":{"first_message":"2021-02-24T17:00:29.303405594+01:00","last_message":"2021-02-24T17:01:22.017684145+01:00"}},"raw_press":103278,"raw_temp":2995,"type":"SENSOR_OFFSETS"},"SERVO_OUTPUT_RAW":{"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.427584142+01:00","last_message":"2021-02-24T17:01:23.780636788+01:00"}},"port":0,"servo10_raw":0,"servo11_raw":0,"servo12_raw":0,"servo13_raw":0,"servo14_raw":0,"servo15_raw":0,"servo16_raw":0,"servo1_raw":1500,"servo2_raw":1500,"servo3_raw":1500,"servo4_raw":1500,"servo5_raw":1500,"servo6_raw":1500,"servo7_raw":0,"servo8_raw":0,"servo9_raw":0,"time_usec":58348318,"type":"SERVO_OUTPUT_RAW"},"SIMSTATE":{"lat":338103130,"lng":-1183938670,"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.431510931+01:00","last_message":"2021-02-24T17:01:23.783346925+01:00"}},"pitch":0.0,"roll":0.0,"type":"SIMSTATE","xacc":0.0,"xgyro":0.0,"yacc":0.0,"yaw":-1.5707963705062866,"ygyro":0.0,"zacc":-9.991242408752441,"zgyro":0.0},"STATUSTEXT":{"chunk_seq":0,"id":0,"message_information":{"counter":12,"frequency":0.2142857164144516,"time":{"first_message":"2021-02-24T17:00:25.525020671+01:00","last_message":"2021-02-24T17:01:22.306545408+01:00"}},"severity":{"type":"MAV_SEVERITY_INFO"},"text":["E","K","F","2"," ","I","M","U","0"," ","i","s"," ","u","s","i","n","g"," ","G","P","S","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000","\u0000"],"type":"STATUSTEXT"},"SYSTEM_TIME":{"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.430669852+01:00","last_message":"2021-02-24T17:01:23.782924814+01:00"}},"time_boot_ms":58348,"time_unix_usec":1614182482914885,"type":"SYSTEM_TIME"},"SYS_STATUS":{"battery_remaining":99,"current_battery":0,"drop_rate_comm":0,"errors_comm":0,"errors_count1":0,"errors_count2":0,"errors_count3":0,"errors_count4":0,"load":0,"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.424648826+01:00","last_message":"2021-02-24T17:01:23.778112379+01:00"}},"onboard_control_sensors_enabled":{"bits":35691823},"onboard_control_sensors_health":{"bits":53517359},"onboard_control_sensors_present":{"bits":52493615},"type":"SYS_STATUS","voltage_battery":12587},"TIMESYNC":{"message_information":{"counter":5,"frequency":0.12820513546466827,"time":{"first_message":"2021-02-24T17:00:35.505449814+01:00","last_message":"2021-02-24T17:01:15.408012713+01:00"}},"tc1":0,"ts1":50010821001,"type":"TIMESYNC"},"VFR_HUD":{"airspeed":0.0,"alt":-0.17999999225139618,"climb":0.13752809166908264,"groundspeed":0.028816834092140198,"heading":270,"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.426754152+01:00","last_message":"2021-02-24T17:01:23.780152198+01:00"}},"throttle":0,"type":"VFR_HUD"},"VIBRATION":{"clipping_0":0,"clipping_1":0,"clipping_2":0,"message_information":{"counter":227,"frequency":3.9824562072753906,"time":{"first_message":"2021-02-24T17:00:26.432917014+01:00","last_message":"2021-02-24T17:01:23.785158555+01:00"}},"time_usec":58348318,"type":"VIBRATION","vibration_x":0.005627060774713755,"vibration_y":0.005976642947643995,"vibration_z":0.00621375534683466}}
I understand AHRS3 is actually activated on autotest. When I analyze the mavlink2rest flow on BR2, altitude values in ATTITUDE and AHRS2 are not set. So I can not use it. How do you activate EKF3 on BR2 ?
When I analyze the mavlink2rest flow on BR2, altitude values in ATTITUDE and AHRS2 are not set. So I can not use it.
How so ? They should be populated, if not that's a huge problem. please provide the output of mavlink2rest of your ROV, you should also test it under SITL.
I just tested it here and it works:
How do you activate EKF3 on BR2 ?
Check the EKF parameters here: https://www.ardusub.com/developers/full-parameter-list.html
I will do some test and let you know. Thank you.
Any update ?
Sorry for late answer. I was in travel... I have set AHRS_EFK_TYPE to type 3 with QGC. But result is the same. Altitude is never valued. Here is the mavlink flow:
{"AHRS":{"accel_weight":0.0,"error_rp":0.8961499929428101,"error_yaw":0.84513920545578,"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.399978881+01:00","last_message":"2021-03-03T12:09:08.700585264+01:00"}},"omegaIx":-0.013802853412926197,"omegaIy":-0.00929949525743723,"omegaIz":0.011294032447040081,"renorm_val":0.0,"type":"AHRS"},"AHRS2":{"altitude":0.0,"lat":0,"lng":0,"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.401701799+01:00","last_message":"2021-03-03T12:09:08.702310443+01:00"}},"pitch":0.029463812708854675,"roll":0.0067618899047374725,"type":"AHRS2","yaw":-0.3136591911315918},"AHRS3":{"altitude":0.0,"lat":0,"lng":0,"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.403341453+01:00","last_message":"2021-03-03T12:09:08.706595736+01:00"}},"pitch":0.029463812708854675,"roll":0.0067618899047374725,"type":"AHRS3","v1":0.0,"v2":0.0,"v3":0.0,"v4":0.0,"yaw":-0.3136591911315918},"ATTITUDE":{"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.382076707+01:00","last_message":"2021-03-03T12:09:08.775305353+01:00"}},"pitch":0.8314077258110046,"pitchspeed":-0.0141063891351223,"roll":1.0058766603469849,"rollspeed":0.6315346360206604,"time_boot_ms":247894,"type":"ATTITUDE","yaw":2.6747241020202637,"yawspeed":-0.27128782868385315},"BATTERY_STATUS":{"battery_function":{"type":"MAV_BATTERY_FUNCTION_UNKNOWN"},"battery_remaining":97,"charge_state":{"type":"MAV_BATTERY_CHARGE_STATE_UNDEFINED"},"current_battery":593,"current_consumed":404,"energy_consumed":215,"id":0,"mavtype":{"type":"MAV_BATTERY_TYPE_UNKNOWN"},"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.411146635+01:00","last_message":"2021-03-03T12:09:08.724151866+01:00"}},"temperature":32767,"time_remaining":0,"type":"BATTERY_STATUS","voltages":[14796,65535,65535,65535,65535,65535,65535,65535,65535,65535]},"GLOBAL_POSITION_INT":{"alt":-10,"hdg":15325,"lat":0,"lon":0,"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.382461711+01:00","last_message":"2021-03-03T12:09:08.775343895+01:00"}},"relative_alt":-11,"time_boot_ms":247894,"type":"GLOBAL_POSITION_INT","vx":0,"vy":0,"vz":0},"GPS_RAW_INT":{"alt":0,"alt_ellipsoid":0,"cog":0,"eph":65535,"epv":65535,"fix_type":{"type":"GPS_FIX_TYPE_NO_GPS"},"h_acc":0,"hdg_acc":0,"lat":0,"lon":0,"message_information":{"counter":96,"frequency":0.9795918464660645,"time":{"first_message":"2021-03-03T12:07:29.102180677+01:00","last_message":"2021-03-03T12:09:08.011645028+01:00"}},"satellites_visible":0,"time_usec":0,"type":"GPS_RAW_INT","v_acc":0,"vel":0,"vel_acc":0,"yaw":0},"HEARTBEAT":{"autopilot":{"type":"MAV_AUTOPILOT_ARDUPILOTMEGA"},"base_mode":{"bits":81},"custom_mode":19,"mavlink_version":3,"mavtype":{"type":"MAV_TYPE_SUBMARINE"},"message_information":{"counter":101,"frequency":1.0099999904632568,"time":{"first_message":"2021-03-03T12:07:28.437286641+01:00","last_message":"2021-03-03T12:09:08.448437898+01:00"}},"system_status":{"type":"MAV_STATE_CRITICAL"},"type":"HEARTBEAT"},"HWSTATUS":{"I2Cerr":0,"Vcc":5103,"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.404986939+01:00","last_message":"2021-03-03T12:09:08.723151327+01:00"}},"type":"HWSTATUS"},"MEMINFO":{"brkval":0,"freemem":65535,"freemem32":111008,"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.384258996+01:00","last_message":"2021-03-03T12:09:08.776942668+01:00"}},"type":"MEMINFO"},"MISSION_CURRENT":{"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.385090810+01:00","last_message":"2021-03-03T12:09:08.780918492+01:00"}},"seq":0,"type":"MISSION_CURRENT"},"MOUNT_STATUS":{"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.407246704+01:00","last_message":"2021-03-03T12:09:08.724084279+01:00"}},"pointing_a":0,"pointing_b":0,"pointing_c":0,"target_component":0,"target_system":0,"type":"MOUNT_STATUS"},"NAMED_VALUE_FLOAT":{"message_information":{"counter":7029,"frequency":70.29000091552734,"time":{"first_message":"2021-03-03T12:07:28.325707041+01:00","last_message":"2021-03-03T12:09:08.725341159+01:00"}},"name":["I","n","p","u","t","H","o","l","d","\u0000"],"time_boot_ms":247810,"type":"NAMED_VALUE_FLOAT","value":0.0},"NAV_CONTROLLER_OUTPUT":{"alt_error":0.2897911071777344,"aspd_error":0.0,"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.384705204+01:00","last_message":"2021-03-03T12:09:08.779269030+01:00"}},"nav_bearing":153,"nav_pitch":47.6365966796875,"nav_roll":57.63274383544922,"target_bearing":0,"type":"NAV_CONTROLLER_OUTPUT","wp_dist":0,"xtrack_error":0.0},"PARAM_VALUE":{"message_information":{"counter":10,"frequency":0.1149425283074379,"time":{"first_message":"2021-03-03T12:07:29.841287688+01:00","last_message":"2021-03-03T12:08:57.031457344+01:00"}},"param_count":920,"param_id":["G","N","D","_","A","B","S","_","P","R","E","S","S","2","\u0000","\u0000"],"param_index":65535,"param_type":{"type":"MAV_PARAM_TYPE_REAL32"},"param_value":102420.0,"type":"PARAM_VALUE"},"POWER_STATUS":{"Vcc":5101,"Vservo":5177,"flags":{"bits":6},"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.384233673+01:00","last_message":"2021-03-03T12:09:08.776909682+01:00"}},"type":"POWER_STATUS"},"RANGEFINDER":{"distance":0.0,"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.405005383+01:00","last_message":"2021-03-03T12:09:08.724047587+01:00"}},"type":"RANGEFINDER","voltage":0.0},"RAW_IMU":{"id":0,"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.389632223+01:00","last_message":"2021-03-03T12:09:08.787387529+01:00"}},"temperature":0,"time_usec":247899711,"type":"RAW_IMU","xacc":-51,"xgyro":1,"xmag":265,"yacc":-67,"ygyro":-6,"ymag":18,"zacc":-943,"zgyro":3,"zmag":300},"RC_CHANNELS":{"chan10_raw":1100,"chan11_raw":1100,"chan12_raw":0,"chan13_raw":0,"chan14_raw":0,"chan15_raw":0,"chan16_raw":0,"chan17_raw":0,"chan18_raw":0,"chan1_raw":1500,"chan2_raw":1500,"chan3_raw":1500,"chan4_raw":1500,"chan5_raw":1500,"chan6_raw":1500,"chan7_raw":1500,"chan8_raw":1500,"chan9_raw":1100,"chancount":0,"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.388296318+01:00","last_message":"2021-03-03T12:09:08.785726102+01:00"}},"rssi":0,"time_boot_ms":247897,"type":"RC_CHANNELS"},"SCALED_IMU2":{"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.391345883+01:00","last_message":"2021-03-03T12:09:08.789171323+01:00"}},"temperature":0,"time_boot_ms":247899,"type":"SCALED_IMU2","xacc":-65,"xgyro":398,"xmag":0,"yacc":-52,"ygyro":-4,"ymag":0,"zacc":-997,"zgyro":-178,"zmag":0},"SCALED_PRESSURE":{"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.393028912+01:00","last_message":"2021-03-03T12:09:08.693900416+01:00"}},"press_abs":1025.3873291015625,"press_diff":0.0,"temperature":2717,"time_boot_ms":247800,"type":"SCALED_PRESSURE"},"SCALED_PRESSURE2":{"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.394596791+01:00","last_message":"2021-03-03T12:09:08.695568085+01:00"}},"press_abs":1025.2999267578125,"press_diff":0.0,"temperature":1424,"time_boot_ms":247800,"type":"SCALED_PRESSURE2"},"SENSOR_OFFSETS":{"accel_cal_x":0.03430579975247383,"accel_cal_y":-0.18180014193058014,"accel_cal_z":-0.20692330598831177,"gyro_cal_x":0.00632186233997345,"gyro_cal_y":0.010034213773906231,"gyro_cal_z":-0.0008939348626881838,"mag_declination":0.0,"mag_ofs_x":112,"mag_ofs_y":-15,"mag_ofs_z":38,"message_information":{"counter":92,"frequency":0.9200000166893005,"time":{"first_message":"2021-03-03T12:07:28.396677897+01:00","last_message":"2021-03-03T12:09:08.523090034+01:00"}},"raw_press":102510,"raw_temp":1423,"type":"SENSOR_OFFSETS"},"SERVO_OUTPUT_RAW":{"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.386345503+01:00","last_message":"2021-03-03T12:09:08.784057919+01:00"}},"port":0,"servo10_raw":0,"servo11_raw":0,"servo12_raw":0,"servo13_raw":0,"servo14_raw":0,"servo15_raw":0,"servo16_raw":0,"servo1_raw":1500,"servo2_raw":1500,"servo3_raw":1500,"servo4_raw":1500,"servo5_raw":1500,"servo6_raw":1100,"servo7_raw":1100,"servo8_raw":1500,"servo9_raw":0,"time_usec":247897385,"type":"SERVO_OUTPUT_RAW"},"SYSTEM_TIME":{"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.398302218+01:00","last_message":"2021-03-03T12:09:08.698981428+01:00"}},"time_boot_ms":247802,"time_unix_usec":0,"type":"SYSTEM_TIME"},"SYS_STATUS":{"battery_remaining":-1,"current_battery":593,"drop_rate_comm":0,"errors_comm":0,"errors_count1":0,"errors_count2":0,"errors_count3":0,"errors_count4":0,"load":384,"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.383456323+01:00","last_message":"2021-03-03T12:09:08.775797974+01:00"}},"onboard_control_sensors_enabled":{"bits":35691791},"onboard_control_sensors_health":{"bits":53517324},"onboard_control_sensors_present":{"bits":52493583},"type":"SYS_STATUS","voltage_battery":14796},"TIMESYNC":{"message_information":{"counter":10,"frequency":0.1111111119389534,"time":{"first_message":"2021-03-03T12:07:31.742575129+01:00","last_message":"2021-03-03T12:09:01.769293858+01:00"}},"tc1":0,"ts1":240884637001,"type":"TIMESYNC"},"VFR_HUD":{"airspeed":0.0,"alt":-0.009999999776482582,"climb":-0.0,"groundspeed":0.0,"heading":153,"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.385108127+01:00","last_message":"2021-03-03T12:09:08.782210750+01:00"}},"throttle":0,"type":"VFR_HUD"},"VIBRATION":{"clipping_0":0,"clipping_1":14,"clipping_2":0,"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.408943810+01:00","last_message":"2021-03-03T12:09:08.724112652+01:00"}},"time_usec":247807351,"type":"VIBRATION","vibration_x":0.15067043900489807,"vibration_y":0.18063734471797943,"vibration_z":0.12864017486572266}}
I will dig further... Anyway, it seems not to be an issue of mavlink2rest if it works by your side. I will close this issue except of you have another idea ?
Sorry for late answer. I was in travel... I have set AHRS_EFK_TYPE to type 3 with QGC. But result is the same. Altitude is never valued. Here is the mavlink flow:
{"AHRS":{"accel_weight":0.0,"error_rp":0.8961499929428101,"error_yaw":0.84513920545578,"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.399978881+01:00","last_message":"2021-03-03T12:09:08.700585264+01:00"}},"omegaIx":-0.013802853412926197,"omegaIy":-0.00929949525743723,"omegaIz":0.011294032447040081,"renorm_val":0.0,"type":"AHRS"},"AHRS2":{"altitude":0.0,"lat":0,"lng":0,"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.401701799+01:00","last_message":"2021-03-03T12:09:08.702310443+01:00"}},"pitch":0.029463812708854675,"roll":0.0067618899047374725,"type":"AHRS2","yaw":-0.3136591911315918},"AHRS3":{"altitude":0.0,"lat":0,"lng":0,"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.403341453+01:00","last_message":"2021-03-03T12:09:08.706595736+01:00"}},"pitch":0.029463812708854675,"roll":0.0067618899047374725,"type":"AHRS3","v1":0.0,"v2":0.0,"v3":0.0,"v4":0.0,"yaw":-0.3136591911315918},"ATTITUDE":{"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.382076707+01:00","last_message":"2021-03-03T12:09:08.775305353+01:00"}},"pitch":0.8314077258110046,"pitchspeed":-0.0141063891351223,"roll":1.0058766603469849,"rollspeed":0.6315346360206604,"time_boot_ms":247894,"type":"ATTITUDE","yaw":2.6747241020202637,"yawspeed":-0.27128782868385315},"BATTERY_STATUS":{"battery_function":{"type":"MAV_BATTERY_FUNCTION_UNKNOWN"},"battery_remaining":97,"charge_state":{"type":"MAV_BATTERY_CHARGE_STATE_UNDEFINED"},"current_battery":593,"current_consumed":404,"energy_consumed":215,"id":0,"mavtype":{"type":"MAV_BATTERY_TYPE_UNKNOWN"},"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.411146635+01:00","last_message":"2021-03-03T12:09:08.724151866+01:00"}},"temperature":32767,"time_remaining":0,"type":"BATTERY_STATUS","voltages":[14796,65535,65535,65535,65535,65535,65535,65535,65535,65535]},"GLOBAL_POSITION_INT":{"alt":-10,"hdg":15325,"lat":0,"lon":0,"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.382461711+01:00","last_message":"2021-03-03T12:09:08.775343895+01:00"}},"relative_alt":-11,"time_boot_ms":247894,"type":"GLOBAL_POSITION_INT","vx":0,"vy":0,"vz":0},"GPS_RAW_INT":{"alt":0,"alt_ellipsoid":0,"cog":0,"eph":65535,"epv":65535,"fix_type":{"type":"GPS_FIX_TYPE_NO_GPS"},"h_acc":0,"hdg_acc":0,"lat":0,"lon":0,"message_information":{"counter":96,"frequency":0.9795918464660645,"time":{"first_message":"2021-03-03T12:07:29.102180677+01:00","last_message":"2021-03-03T12:09:08.011645028+01:00"}},"satellites_visible":0,"time_usec":0,"type":"GPS_RAW_INT","v_acc":0,"vel":0,"vel_acc":0,"yaw":0},"HEARTBEAT":{"autopilot":{"type":"MAV_AUTOPILOT_ARDUPILOTMEGA"},"base_mode":{"bits":81},"custom_mode":19,"mavlink_version":3,"mavtype":{"type":"MAV_TYPE_SUBMARINE"},"message_information":{"counter":101,"frequency":1.0099999904632568,"time":{"first_message":"2021-03-03T12:07:28.437286641+01:00","last_message":"2021-03-03T12:09:08.448437898+01:00"}},"system_status":{"type":"MAV_STATE_CRITICAL"},"type":"HEARTBEAT"},"HWSTATUS":{"I2Cerr":0,"Vcc":5103,"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.404986939+01:00","last_message":"2021-03-03T12:09:08.723151327+01:00"}},"type":"HWSTATUS"},"MEMINFO":{"brkval":0,"freemem":65535,"freemem32":111008,"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.384258996+01:00","last_message":"2021-03-03T12:09:08.776942668+01:00"}},"type":"MEMINFO"},"MISSION_CURRENT":{"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.385090810+01:00","last_message":"2021-03-03T12:09:08.780918492+01:00"}},"seq":0,"type":"MISSION_CURRENT"},"MOUNT_STATUS":{"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.407246704+01:00","last_message":"2021-03-03T12:09:08.724084279+01:00"}},"pointing_a":0,"pointing_b":0,"pointing_c":0,"target_component":0,"target_system":0,"type":"MOUNT_STATUS"},"NAMED_VALUE_FLOAT":{"message_information":{"counter":7029,"frequency":70.29000091552734,"time":{"first_message":"2021-03-03T12:07:28.325707041+01:00","last_message":"2021-03-03T12:09:08.725341159+01:00"}},"name":["I","n","p","u","t","H","o","l","d","\u0000"],"time_boot_ms":247810,"type":"NAMED_VALUE_FLOAT","value":0.0},"NAV_CONTROLLER_OUTPUT":{"alt_error":0.2897911071777344,"aspd_error":0.0,"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.384705204+01:00","last_message":"2021-03-03T12:09:08.779269030+01:00"}},"nav_bearing":153,"nav_pitch":47.6365966796875,"nav_roll":57.63274383544922,"target_bearing":0,"type":"NAV_CONTROLLER_OUTPUT","wp_dist":0,"xtrack_error":0.0},"PARAM_VALUE":{"message_information":{"counter":10,"frequency":0.1149425283074379,"time":{"first_message":"2021-03-03T12:07:29.841287688+01:00","last_message":"2021-03-03T12:08:57.031457344+01:00"}},"param_count":920,"param_id":["G","N","D","_","A","B","S","_","P","R","E","S","S","2","\u0000","\u0000"],"param_index":65535,"param_type":{"type":"MAV_PARAM_TYPE_REAL32"},"param_value":102420.0,"type":"PARAM_VALUE"},"POWER_STATUS":{"Vcc":5101,"Vservo":5177,"flags":{"bits":6},"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.384233673+01:00","last_message":"2021-03-03T12:09:08.776909682+01:00"}},"type":"POWER_STATUS"},"RANGEFINDER":{"distance":0.0,"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.405005383+01:00","last_message":"2021-03-03T12:09:08.724047587+01:00"}},"type":"RANGEFINDER","voltage":0.0},"RAW_IMU":{"id":0,"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.389632223+01:00","last_message":"2021-03-03T12:09:08.787387529+01:00"}},"temperature":0,"time_usec":247899711,"type":"RAW_IMU","xacc":-51,"xgyro":1,"xmag":265,"yacc":-67,"ygyro":-6,"ymag":18,"zacc":-943,"zgyro":3,"zmag":300},"RC_CHANNELS":{"chan10_raw":1100,"chan11_raw":1100,"chan12_raw":0,"chan13_raw":0,"chan14_raw":0,"chan15_raw":0,"chan16_raw":0,"chan17_raw":0,"chan18_raw":0,"chan1_raw":1500,"chan2_raw":1500,"chan3_raw":1500,"chan4_raw":1500,"chan5_raw":1500,"chan6_raw":1500,"chan7_raw":1500,"chan8_raw":1500,"chan9_raw":1100,"chancount":0,"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.388296318+01:00","last_message":"2021-03-03T12:09:08.785726102+01:00"}},"rssi":0,"time_boot_ms":247897,"type":"RC_CHANNELS"},"SCALED_IMU2":{"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.391345883+01:00","last_message":"2021-03-03T12:09:08.789171323+01:00"}},"temperature":0,"time_boot_ms":247899,"type":"SCALED_IMU2","xacc":-65,"xgyro":398,"xmag":0,"yacc":-52,"ygyro":-4,"ymag":0,"zacc":-997,"zgyro":-178,"zmag":0},"SCALED_PRESSURE":{"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.393028912+01:00","last_message":"2021-03-03T12:09:08.693900416+01:00"}},"press_abs":1025.3873291015625,"press_diff":0.0,"temperature":2717,"time_boot_ms":247800,"type":"SCALED_PRESSURE"},"SCALED_PRESSURE2":{"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.394596791+01:00","last_message":"2021-03-03T12:09:08.695568085+01:00"}},"press_abs":1025.2999267578125,"press_diff":0.0,"temperature":1424,"time_boot_ms":247800,"type":"SCALED_PRESSURE2"},"SENSOR_OFFSETS":{"accel_cal_x":0.03430579975247383,"accel_cal_y":-0.18180014193058014,"accel_cal_z":-0.20692330598831177,"gyro_cal_x":0.00632186233997345,"gyro_cal_y":0.010034213773906231,"gyro_cal_z":-0.0008939348626881838,"mag_declination":0.0,"mag_ofs_x":112,"mag_ofs_y":-15,"mag_ofs_z":38,"message_information":{"counter":92,"frequency":0.9200000166893005,"time":{"first_message":"2021-03-03T12:07:28.396677897+01:00","last_message":"2021-03-03T12:09:08.523090034+01:00"}},"raw_press":102510,"raw_temp":1423,"type":"SENSOR_OFFSETS"},"SERVO_OUTPUT_RAW":{"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.386345503+01:00","last_message":"2021-03-03T12:09:08.784057919+01:00"}},"port":0,"servo10_raw":0,"servo11_raw":0,"servo12_raw":0,"servo13_raw":0,"servo14_raw":0,"servo15_raw":0,"servo16_raw":0,"servo1_raw":1500,"servo2_raw":1500,"servo3_raw":1500,"servo4_raw":1500,"servo5_raw":1500,"servo6_raw":1100,"servo7_raw":1100,"servo8_raw":1500,"servo9_raw":0,"time_usec":247897385,"type":"SERVO_OUTPUT_RAW"},"SYSTEM_TIME":{"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.398302218+01:00","last_message":"2021-03-03T12:09:08.698981428+01:00"}},"time_boot_ms":247802,"time_unix_usec":0,"type":"SYSTEM_TIME"},"SYS_STATUS":{"battery_remaining":-1,"current_battery":593,"drop_rate_comm":0,"errors_comm":0,"errors_count1":0,"errors_count2":0,"errors_count3":0,"errors_count4":0,"load":384,"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.383456323+01:00","last_message":"2021-03-03T12:09:08.775797974+01:00"}},"onboard_control_sensors_enabled":{"bits":35691791},"onboard_control_sensors_health":{"bits":53517324},"onboard_control_sensors_present":{"bits":52493583},"type":"SYS_STATUS","voltage_battery":14796},"TIMESYNC":{"message_information":{"counter":10,"frequency":0.1111111119389534,"time":{"first_message":"2021-03-03T12:07:31.742575129+01:00","last_message":"2021-03-03T12:09:01.769293858+01:00"}},"tc1":0,"ts1":240884637001,"type":"TIMESYNC"},"VFR_HUD":{"airspeed":0.0,"alt":-0.009999999776482582,"climb":-0.0,"groundspeed":0.0,"heading":153,"message_information":{"counter":1005,"frequency":10.050000190734863,"time":{"first_message":"2021-03-03T12:07:28.385108127+01:00","last_message":"2021-03-03T12:09:08.782210750+01:00"}},"throttle":0,"type":"VFR_HUD"},"VIBRATION":{"clipping_0":0,"clipping_1":14,"clipping_2":0,"message_information":{"counter":1004,"frequency":10.039999961853027,"time":{"first_message":"2021-03-03T12:07:28.408943810+01:00","last_message":"2021-03-03T12:09:08.724112652+01:00"}},"time_usec":247807351,"type":"VIBRATION","vibration_x":0.15067043900489807,"vibration_y":0.18063734471797943,"vibration_z":0.12864017486572266}}
I will dig further... Anyway, it seems not to be an issue of mavlink2rest if it works by your side. I will close this issue except of you have another idea ?
From your json, all attitude messages are there. What is the problem ?
"altitude" attribute is always with value "0" ; even when the ROV is moving up an down.
Sorry, about that is necessary to use VFR_HUD
or GLOBAL_POSITION_INT
, Altitude information is not provided by AHRS
OK. Thx. I will rely on those values.
Just an update, I'll be working to improve mavlink2rest web functionalities soon related to the main webpage, any suggestion is much appreciated.
Hi, Using mavlink2rest with ardupilot autotest, altitude information is available in AHRS3 section. Data is updated regularly and correct. Using physical BR2, this info is not available. Value is sticked to zero. Any idea why ? Tested with :