mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 08:38:53 +08:00
CollisionPrevention remove mavlink_log outputs
This commit is contained in:
committed by
Julian Kent
parent
a9491dfaf7
commit
678e32caf7
@@ -483,11 +483,6 @@ CollisionPrevention::_calculateConstrainedSetpoint(Vector2f &setpoint, const Vec
|
||||
//if the sensor field of view is zero, never allow to move (even if move_no_data=1)
|
||||
if (num_fov_bins == 0) {
|
||||
vel_max = 0.f;
|
||||
|
||||
if (getElapsedTime(&_last_timeout_warning) > 1_s) {
|
||||
mavlink_log_critical(&_mavlink_log_pub, "Range sensor data invalid, no movement allowed.");
|
||||
_last_timeout_warning = getTime();
|
||||
}
|
||||
}
|
||||
|
||||
setpoint = setpoint_dir * vel_max;
|
||||
@@ -500,12 +495,10 @@ CollisionPrevention::_calculateConstrainedSetpoint(Vector2f &setpoint, const Vec
|
||||
|
||||
// if distance data is stale, switch to Loiter
|
||||
if (getElapsedTime(&_last_timeout_warning) > 1_s && getElapsedTime(&_time_activated) > 1_s) {
|
||||
mavlink_log_critical(&_mavlink_log_pub, "No range data received, no movement allowed.");
|
||||
|
||||
if ((constrain_time - _obstacle_map_body_frame.timestamp) > TIMEOUT_HOLD_US
|
||||
&& getElapsedTime(&_time_activated) > TIMEOUT_HOLD_US) {
|
||||
_publishVehicleCmdDoLoiter();
|
||||
mavlink_log_critical(&_mavlink_log_pub, "No range data received, switch to HOLD.");
|
||||
}
|
||||
|
||||
_last_timeout_warning = getTime();
|
||||
@@ -529,13 +522,6 @@ CollisionPrevention::modifySetpoint(Vector2f &original_setpoint, const float max
|
||||
|| new_setpoint(1) < original_setpoint(1) - 0.05f * max_speed
|
||||
|| new_setpoint(1) > original_setpoint(1) + 0.05f * max_speed);
|
||||
|
||||
if (currently_interfering && !_interfering) {
|
||||
if (getElapsedTime(&_last_collision_warning) > 3_s) {
|
||||
mavlink_log_info(&_mavlink_log_pub, "Collision Prevention limiting velocity");
|
||||
_last_collision_warning = getTime();
|
||||
}
|
||||
}
|
||||
|
||||
_interfering = currently_interfering;
|
||||
|
||||
// publish constraints
|
||||
|
||||
@@ -138,7 +138,6 @@ private:
|
||||
static constexpr uint64_t RANGE_STREAM_TIMEOUT_US{500_ms};
|
||||
static constexpr uint64_t TIMEOUT_HOLD_US{5_s};
|
||||
|
||||
hrt_abstime _last_collision_warning{0};
|
||||
hrt_abstime _last_timeout_warning{0};
|
||||
hrt_abstime _time_activated{0};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user