Skip to content

Commit

Permalink
chore(motion_velocity_smoother): remove string stream creation (#7131)
Browse files Browse the repository at this point in the history
* chore(motion_velocity_smoother): remove string stream creation

Signed-off-by: Fumiya Watanabe <[email protected]>

* fix: use format string

Signed-off-by: Fumiya Watanabe <[email protected]>

---------

Signed-off-by: Fumiya Watanabe <[email protected]>
  • Loading branch information
rej55 authored May 31, 2024
1 parent d5a6c54 commit c92185a
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,12 @@ bool calcStopVelocityWithConstantJerkAccLimit(
}

// for debug
std::stringstream ss;
RCLCPP_DEBUG(rclcpp::get_logger("velocity_planning_utils"), "Calculate stop velocity.");
for (unsigned int i = 0; i < ts.size(); ++i) {
ss << "t: " << ts.at(i) << ", x: " << xs.at(i) << ", v: " << vs.at(i) << ", a: " << as.at(i)
<< ", j: " << js.at(i) << std::endl;
RCLCPP_DEBUG(
rclcpp::get_logger("velocity_planning_utils"), "--- t: %f, x: %f, v: %f, a: %f, j: %f",
ts.at(i), xs.at(i), vs.at(i), as.at(i), js.at(i));
}
RCLCPP_DEBUG(
rclcpp::get_logger("velocity_planning_utils"), "Calculate stop velocity. %s", ss.str().c_str());

const double a_target = 0.0;
const double v_margin = 0.3;
Expand Down

0 comments on commit c92185a

Please sign in to comment.