Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ros2: revert value of epsilon used in getClosestPoint #49

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions terrain_navigation/include/terrain_navigation/path_segment.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class PathSegment {
return theta;
}

double getLength(double epsilon = 0.001) {
double getLength(double epsilon = 1.0E-3) {
double length{0.0};
Eigen::Vector3d segment_start = states.front().position;
Eigen::Vector3d segment_end = states.back().position;
Expand Down Expand Up @@ -198,7 +198,7 @@ class PathSegment {
}

double getClosestPoint(const Eigen::Vector3d &position, Eigen::Vector3d &closest_point, Eigen::Vector3d &tangent,
double &segment_curvature, double epsilon = 0.001) {
double &segment_curvature, double epsilon = 1.0E-4) {
double theta{-std::numeric_limits<double>::infinity()};
segment_curvature = curvature;
Eigen::Vector3d segment_start = states.front().position;
Expand Down
2 changes: 1 addition & 1 deletion terrain_navigation_ros/src/terrain_planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void TerrainPlanner::cmdloopCallback() {
double reference_curvature{0.0};
auto current_segment = reference_primitive_.getCurrentSegment(vehicle_position_);
double path_progress = current_segment.getClosestPoint(vehicle_position_, reference_position, reference_tangent,
reference_curvature, 1.0);
reference_curvature, 1.0E-4);
// Publish global position setpoints in the global frame
ESPG map_coordinate;
Eigen::Vector3d map_origin;
Expand Down