Skip to content

Commit

Permalink
Reduce terminal printouts from slotcar (#73)
Browse files Browse the repository at this point in the history
* Move certain printouts to debug stream

Signed-off-by: Yadunund <yadunund@openrobotics.org>

* Use const reference

Signed-off-by: Yadunund <yadunund@openrobotics.org>
  • Loading branch information
Yadunund committed Jun 23, 2022
1 parent 4320b0d commit 23717f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion rmf_building_sim_common/src/lift_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ uint32_t LiftCommon::get_door_state(
const auto doors = floor_to_door_map.find(
_lift_state.current_floor)->second;
const std::size_t num = doors.size();
for (const std::string door : doors)
for (const std::string& door : doors)
{
const auto& door_state = door_states.find(door)->second;
if ((door_state) &&
Expand Down
10 changes: 5 additions & 5 deletions rmf_robot_sim_common/src/slotcar_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ void SlotcarCommon::path_request_cb(

const auto old_path = _remaining_path;

RCLCPP_INFO(
RCLCPP_DEBUG(
logger(),
"%s received a path request with %d waypoints",
_model_name.c_str(), (int)msg->path.size());
Expand Down Expand Up @@ -593,14 +593,14 @@ SlotcarCommon::UpdateResult SlotcarCommon::update_diff_drive(
return result;

_remaining_path.erase(_remaining_path.begin());
RCLCPP_INFO(logger(),
RCLCPP_DEBUG(logger(),
"%s reached waypoint %ld/%d",
_model_name.c_str(),
_traj_wp_idx,
(int)trajectory.size());
if (_traj_wp_idx == trajectory.size())
{
RCLCPP_INFO(
RCLCPP_DEBUG(
logger(),
"%s reached goal -- rotating to face target",
_model_name.c_str());
Expand Down Expand Up @@ -735,14 +735,14 @@ SlotcarCommon::UpdateResult SlotcarCommon::update_ackermann(
_traj_wp_idx++;

_remaining_path.erase(_remaining_path.begin());
RCLCPP_INFO(logger(),
RCLCPP_DEBUG(logger(),
"%s reached waypoint %ld/%d",
_model_name.c_str(),
_traj_wp_idx,
(int)trajectory.size());
if (_traj_wp_idx == trajectory.size())
{
RCLCPP_INFO(
RCLCPP_DEBUG(
logger(),
"%s reached goal",
_model_name.c_str());
Expand Down

0 comments on commit 23717f1

Please sign in to comment.