Skip to content

Commit

Permalink
Don't print warning if lift is going to same floor (#89)
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Della Vedova <luca@openrobotics.org>
  • Loading branch information
luca-della-vedova committed Nov 23, 2022
1 parent bc0cf13 commit 1279995
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
5 changes: 5 additions & 0 deletions rmf_building_sim_common/CHANGELOG.md
@@ -1,5 +1,10 @@
## Changelog for package rmf\_building\_sim\_common

2.1.0 (2022-XX-XX)
------------------
* Don't print warning if lift is going to same floor ([#89](https://github.com/open-rmf/rmf_simulation/pull/89))
* Contributors: Luca Della Vedova

2.0.0 (2022-XX-XX)
------------------
* Use ECM instead of traversing sdformat parent for Gazebo doors ([#80](https://github.com/open-rmf/rmf_simulation/pull/80))
Expand Down
15 changes: 11 additions & 4 deletions rmf_building_sim_common/src/lift_common.cpp
Expand Up @@ -225,11 +225,18 @@ LiftCommon::LiftCommon(rclcpp::Node::SharedPtr node,
return;
}

if (_lift_request) // Lift is still processing a previous request
// Trigger an error if a request, different from previous one, comes in
// Noop if request is the same
if (_lift_request)
{
RCLCPP_INFO(logger(),
"Failed to request: [%s] is busy at the moment",
_lift_name.c_str());
if (_lift_request->destination_floor != msg->destination_floor ||
_lift_request->request_type != msg->request_type ||
_lift_request->session_id != msg->session_id)
{
RCLCPP_INFO(logger(),
"Discarding request: [%s] is busy at the moment",
_lift_name.c_str());
}
return;
}

Expand Down

0 comments on commit 1279995

Please sign in to comment.