Skip to content

Commit

Permalink
Fix warning and cleanup unneeded placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
sjahr committed Dec 1, 2023
1 parent bddab3f commit e627e49
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ class Ros2ControlManager : public moveit_controller_manager::MoveItControllerMan
void discover(bool force = false)
{
// Skip if controller stamp is too new for new discovery, enforce update if force==true
if (!force && ((node_->now() - controllers_stamp_) < CONTROLLER_INFORMATION_VALIDITY_AGE))
const auto CONTROLLER_INFORMATION_AGE = node_->now() - controllers_stamp_;
if (!force && (CONTROLLER_INFORMATION_AGE > CONTROLLER_INFORMATION_VALIDITY_AGE))
{
RCLCPP_WARN_STREAM(LOGGER, "Controller information from " << list_controllers_service_->get_service_name()
<< " is out of date, skipping discovery");
RCLCPP_WARN_STREAM(LOGGER, "Controller information from "
<< list_controllers_service_->get_service_name() << " is out of date ("
<< CONTROLLER_INFORMATION_AGE.seconds() << "s old), skipping discovery");
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ MoveGroupExecuteTrajectoryAction::MoveGroupExecuteTrajectoryAction() : MoveGroup

void MoveGroupExecuteTrajectoryAction::initialize()
{
using std::placeholders::_1;
using std::placeholders::_2;

auto node = context_->moveit_cpp_->getNode();
// start the move action server
execute_action_server_ = rclcpp_action::create_server<ExecTrajectory>(
Expand Down

0 comments on commit e627e49

Please sign in to comment.