Skip to content

Commit c92185a

Browse files
authored
chore(motion_velocity_smoother): remove string stream creation (#7131)
* chore(motion_velocity_smoother): remove string stream creation Signed-off-by: Fumiya Watanabe <rej55.g@gmail.com> * fix: use format string Signed-off-by: Fumiya Watanabe <rej55.g@gmail.com> --------- Signed-off-by: Fumiya Watanabe <rej55.g@gmail.com>
1 parent d5a6c54 commit c92185a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

+4-5
Original file line numberDiff line numberDiff line change
@@ -199,13 +199,12 @@ 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(
205+
rclcpp::get_logger("velocity_planning_utils"), "--- t: %f, x: %f, v: %f, a: %f, j: %f",
206+
ts.at(i), xs.at(i), vs.at(i), as.at(i), js.at(i));
206207
}
207-
RCLCPP_DEBUG(
208-
rclcpp::get_logger("velocity_planning_utils"), "Calculate stop velocity. %s", ss.str().c_str());
209208

210209
const double a_target = 0.0;
211210
const double v_margin = 0.3;

0 commit comments

Comments
 (0)