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

Improve arrival time predictions for lanes with speed limits #400

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
15 changes: 12 additions & 3 deletions rmf_fleet_adapter/src/rmf_fleet_adapter/agv/EasyFullControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1245,10 +1245,19 @@ void EasyCommandHandle::follow_new_path(
}

std::optional<double> speed_limit;
if (!wp1.approach_lanes().empty())
for (const auto arrival_lane : wp1.approach_lanes())
{
const auto arrival_lane = wp1.approach_lanes().back();
speed_limit = graph.get_lane(arrival_lane).properties().speed_limit();
if (const auto lane_speed_limit = graph.get_lane(arrival_lane).properties().speed_limit())
{
if (!speed_limit.has_value())
{
speed_limit = lane_speed_limit;
}
else if (*lane_speed_limit < *speed_limit)
{
speed_limit = lane_speed_limit;
}
}
}

Eigen::Vector3d target_position = wp1.position();
Expand Down
Loading