Skip to content

Commit

Permalink
Merge branch 'feature/speed_limits_and_lane_states' into feature/rmf_…
Browse files Browse the repository at this point in the history
…obstacle
  • Loading branch information
Yadunund committed Jul 1, 2022
2 parents 399d4ae + 06366c5 commit 069d52c
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1639,8 +1639,19 @@ auto FleetUpdateHandle::limit_lane_speeds(
{
// TODO: Check if planner supports negative speed limits.
if (request.lane_index() >= new_graph.num_lanes() ||
request.speed_limit() < 0.0)
request.speed_limit() <= 0.0)
{
RCLCPP_WARN(
self->_pimpl->node->get_logger(),
"Ignoring speed limit request %f for lane %d in fleet %s as it is "
"not greater than zero. If you would like to close the lane, use "
"the FleetUpdateHandle::close_lanes(~) API instead.",
request.speed_limit(),
request.lane_index(),
self->_pimpl->name.c_str()
);
continue;
}
auto& properties = new_graph.get_lane(
request.lane_index()).properties();
properties.speed_limit(request.speed_limit());
Expand Down

0 comments on commit 069d52c

Please sign in to comment.