Skip to content

Commit

Permalink
Reworked by adding comment.
Browse files Browse the repository at this point in the history
  • Loading branch information
lewie-donckers committed Mar 3, 2022
1 parent 16acb5e commit c615c89
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/path_tracking_pid_local_planner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,9 @@ std::optional<geometry_msgs::Twist> TrackingPidLocalPlanner::computeVelocityComm
auto cmd_vel = geometry_msgs::Twist();
cmd_vel.linear.x = pid_controller_.getControllerState().current_x_vel;
cmd_vel.angular.z = pid_controller_.getControllerState().current_yaw_vel;
// At the first call of computeVelocityCommands() we can't calculate a cmd_vel. We can't return
// false because of https://github.com/magazino/move_base_flex/issues/195 so the current
// velocity is send instead.
return cmd_vel;
}
if (dt < ros::Duration(0) || dt > ros::Duration(DT_MAX)) {
Expand Down

0 comments on commit c615c89

Please sign in to comment.