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 23, 2023
1 parent 0c242f2 commit d983053
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 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,9 @@ 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::ostream_iterator<std::string>(joint_names, ""),
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 d983053

Please sign in to comment.