Skip to content

Commit

Permalink
fixing rangefinder
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Aug 3, 2024
1 parent cecc21c commit 5ff267a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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.01;
} else {
range_measurement = std::numeric_limits<double>::max();
}
Expand Down

0 comments on commit 5ff267a

Please sign in to comment.