mavlink: add new extvisionmin mode (#12279)

Signed-off-by: DanielePettenuzzo <daniele@px4.io>
This commit is contained in:
Daniele Pettenuzzo
2019-06-28 16:44:22 +02:00
committed by Daniel Agar
parent c22ed9397e
commit 55b5e7552c
3 changed files with 43 additions and 15 deletions

View File

@@ -44,7 +44,7 @@
*
* @reboot_required true
* @min 0
* @max 99999
* @max 9999999
* @group System
*/
PARAM_DEFINE_INT32(SYS_AUTOSTART, 0);

View File

@@ -1678,28 +1678,49 @@ Mavlink::configure_streams_to_default(const char *configure_single_stream)
break;
case MAVLINK_MODE_EXTVISION:
configure_stream_local("ALTITUDE", 10.0f); // for avoidance
configure_stream_local("ATTITUDE", 25.0f);
configure_stream_local("ATTITUDE_TARGET", 10.0f);
configure_stream_local("CAMERA_TRIGGER", unlimited_rate); // for VIO
configure_stream_local("DISTANCE_SENSOR", 10.0f); // for avoidance
configure_stream_local("HIGHRES_IMU", unlimited_rate); // for VIO
configure_stream_local("TIMESYNC", 10.0f);
// FALLTHROUGH
case MAVLINK_MODE_EXTVISIONMIN:
configure_stream_local("ADSB_VEHICLE", unlimited_rate);
configure_stream_local("ALTITUDE", 10.0f);
configure_stream_local("ATTITUDE", 20.0f);
configure_stream_local("ATTITUDE_TARGET", 2.0f);
configure_stream_local("CAMERA_IMAGE_CAPTURED", unlimited_rate);
configure_stream_local("CAMERA_TRIGGER", unlimited_rate);
configure_stream_local("COLLISION", unlimited_rate);
configure_stream_local("DEBUG", 1.0f);
configure_stream_local("DEBUG_FLOAT_ARRAY", 1.0f);
configure_stream_local("DEBUG_VECT", 1.0f);
configure_stream_local("DISTANCE_SENSOR", 10.0f);
configure_stream_local("ESTIMATOR_STATUS", 1.0f);
configure_stream_local("EXTENDED_SYS_STATE", 1.0f);
configure_stream_local("GLOBAL_POSITION_INT", 10.0f);
configure_stream_local("GLOBAL_POSITION_INT", 5.0f);
configure_stream_local("GPS2_RAW", 1.0f);
configure_stream_local("GPS_RAW_INT", 1.0f);
configure_stream_local("HOME_POSITION", 0.5f);
configure_stream_local("HIGHRES_IMU", unlimited_rate); // for VIO
configure_stream_local("LOCAL_POSITION_NED", 30.0f); //for VIO and avoidance
configure_stream_local("LOCAL_POSITION_NED", 30.0f);
configure_stream_local("NAMED_VALUE_FLOAT", 1.0f);
configure_stream_local("NAV_CONTROLLER_OUTPUT", 1.5f);
configure_stream_local("ODOMETRY", 30.0f);
configure_stream_local("OPTICAL_FLOW_RAD", 1.0f);
configure_stream_local("ORBIT_EXECUTION_STATUS", 5.0f);
configure_stream_local("PING", 0.1f);
configure_stream_local("POSITION_TARGET_GLOBAL_INT", 1.5f);
configure_stream_local("POSITION_TARGET_LOCAL_NED", 1.5f);
configure_stream_local("RC_CHANNELS", 5.0f);
configure_stream_local("SERVO_OUTPUT_RAW_0", 1.0f);
configure_stream_local("SYS_STATUS", 5.0f);
configure_stream_local("SYSTEM_TIME", 1.0f);
configure_stream_local("TIMESYNC", 10.0f);
configure_stream_local("TRAJECTORY_REPRESENTATION_WAYPOINTS", 5.0f); // for avoidance
configure_stream_local("VFR_HUD", 25.0f);
configure_stream_local("WIND_COV", 2.0f);
configure_stream_local("TRAJECTORY_REPRESENTATION_WAYPOINTS", 5.0f);
configure_stream_local("UTM_GLOBAL_POSITION", 1.0f);
configure_stream_local("VFR_HUD", 4.0f);
configure_stream_local("WIND_COV", 1.0f);
break;
case MAVLINK_MODE_OSD:
configure_stream_local("ALTITUDE", 1.0f);
configure_stream_local("ALTITUDE", 10.0f);
configure_stream_local("ATTITUDE", 25.0f);
configure_stream_local("ATTITUDE_TARGET", 10.0f);
configure_stream_local("ESTIMATOR_STATUS", 1.0f);
@@ -1988,6 +2009,9 @@ Mavlink::task_main(int argc, char *argv[])
} else if (strcmp(myoptarg, "extvision") == 0) {
_mode = MAVLINK_MODE_EXTVISION;
} else if (strcmp(myoptarg, "extvisionmin") == 0) {
_mode = MAVLINK_MODE_EXTVISIONMIN;
} else {
PX4_ERR("invalid mode");
err_flag = true;

View File

@@ -189,6 +189,7 @@ public:
MAVLINK_MODE_IRIDIUM,
MAVLINK_MODE_MINIMAL,
MAVLINK_MODE_EXTVISION,
MAVLINK_MODE_EXTVISIONMIN,
MAVLINK_MODE_COUNT
};
@@ -235,6 +236,9 @@ public:
case MAVLINK_MODE_EXTVISION:
return "ExtVision";
case MAVLINK_MODE_EXTVISIONMIN:
return "ExtVisionMin";
default:
return "Unknown";
}