Skip to content

Commit

Permalink
Log output formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahiminfinite committed May 20, 2023
1 parent b8c49f9 commit bfd95cd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions moveit_ros/moveit_servo/src/servo_calcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ bool ServoCalcs::cartesianServoCalcs(geometry_msgs::msg::TwistStamped& cmd,
if (cmd.header.frame_id.empty())
{
RCLCPP_WARN_STREAM_THROTTLE(LOGGER, *node_->get_clock(), ROS_LOG_THROTTLE_PERIOD,
"No frame specified for command, will use planning_frame : "
"No frame specified for command, will use planning_frame: "
<< servo_params_.planning_frame);
cmd.header.frame_id = servo_params_.planning_frame;
}
Expand Down Expand Up @@ -638,11 +638,10 @@ bool ServoCalcs::internalServoUpdate(Eigen::ArrayXd& delta_theta,
if (!joints_to_halt.empty())
{
std::ostringstream joint_names;
std::transform(joints_to_halt.cbegin(), std::prev(joints_to_halt.cend()),
std::transform(joints_to_halt.cbegin(), joints_to_halt.cend(),
std::ostream_iterator<std::string>(joint_names, ""),
[](const auto& joint) { return " '" + joint->getName() + "'"; });

joint_names << joints_to_halt.back()->getName();
RCLCPP_WARN_STREAM_THROTTLE(LOGGER, *node_->get_clock(), ROS_LOG_THROTTLE_PERIOD,
"Joints" << joint_names.str() << " close to a position limit. Halting.");

Expand Down

0 comments on commit bfd95cd

Please sign in to comment.