Skip to content

Commit

Permalink
updated rangefinder min range and added offset
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Aug 2, 2024
1 parent 8188606 commit 780d1ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uav_system_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ void UavSystemRos::publishRangefinder(const MultirotorModel::State &state) {
double range_measurement;

if (body_z(2) > 0) {
range_measurement = (state.x(2) - model_params_.ground_z) / cos(tilt);
range_measurement = (state.x(2) - model_params_.ground_z) / cos(tilt) + 0.10;
} else {
range_measurement = std::numeric_limits<double>::max();
}
Expand All @@ -423,7 +423,7 @@ void UavSystemRos::publishRangefinder(const MultirotorModel::State &state) {
range.header.frame_id = _frame_rangefinder_;
range.header.stamp = ros::Time::now();
range.max_range = 40.0;
range.min_range = 0.15;
range.min_range = 0.05;
range.range = range_measurement;
range.radiation_type = range.INFRARED;
range.field_of_view = 0.01;
Expand Down

0 comments on commit 780d1ee

Please sign in to comment.