Skip to content

Commit c305ccd

Browse files
committed
chore(motion_velocity_smoother): remove string stream creation
Signed-off-by: Fumiya Watanabe <rej55.g@gmail.com>
1 parent 9d71cce commit c305ccd

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

planning/motion_velocity_smoother/src/smoother/analytical_jerk_constrained_smoother/velocity_planning_utils.cpp

+6-5
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,14 @@ bool calcStopVelocityWithConstantJerkAccLimit(
199199
}
200200

201201
// for debug
202-
std::stringstream ss;
202+
RCLCPP_DEBUG(rclcpp::get_logger("velocity_planning_utils"), "Calculate stop velocity.");
203203
for (unsigned int i = 0; i < ts.size(); ++i) {
204-
ss << "t: " << ts.at(i) << ", x: " << xs.at(i) << ", v: " << vs.at(i) << ", a: " << as.at(i)
205-
<< ", j: " << js.at(i) << std::endl;
204+
RCLCPP_DEBUG_STREAM(
205+
rclcpp::get_logger("velocity_planning_utils"), "--- "
206+
<< "t: " << ts.at(i) << ", x: " << xs.at(i)
207+
<< ", v: " << vs.at(i) << ", a: " << as.at(i)
208+
<< ", j: " << js.at(i));
206209
}
207-
RCLCPP_DEBUG(
208-
rclcpp::get_logger("velocity_planning_utils"), "Calculate stop velocity. %s", ss.str().c_str());
209210

210211
const double a_target = 0.0;
211212
const double v_margin = 0.3;

0 commit comments

Comments
 (0)