Skip to content

Commit

Permalink
remove setting curr_cmd to zero when cmd_dt is negative to avoid abru…
Browse files Browse the repository at this point in the history
…pt changes in control
  • Loading branch information
Gabriel Alcantara Costa Silva committed Jun 10, 2021
1 parent b69548f commit 1e8bf64
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,6 @@ namespace ackermann_steering_controller{
if(cmd_dt < 0)
{
ROS_ERROR("Invalid time interval, delta time cannot be negative");
curr_cmd.lin = 0.0;
curr_cmd.ang = 0.0;
}

limiter_lin_.limit(curr_cmd.lin, last0_cmd_.lin, last1_cmd_.lin, cmd_dt);
Expand Down
2 changes: 0 additions & 2 deletions diff_drive_controller/src/diff_drive_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,6 @@ namespace diff_drive_controller{
if(cmd_dt < 0)
{
ROS_ERROR("Invalid time interval, delta time cannot be negative");
curr_cmd.lin = 0.0;
curr_cmd.ang = 0.0;
}

limiter_lin_.limit(curr_cmd.lin, last0_cmd_.lin, last1_cmd_.lin, cmd_dt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,12 +366,6 @@ namespace four_wheel_steering_controller{
if(cmd_dt < 0)
{
ROS_ERROR("Invalid time interval, delta time cannot be negative");
curr_cmd_twist.lin_x = 0.0;
curr_cmd_twist.lin_y = 0.0;
curr_cmd_twist.ang = 0.0;
curr_cmd_4ws.lin = 0.0;
curr_cmd_4ws.front_steering = 0.0;
curr_cmd_4ws.rear_steering = 0.0;
}

const double angular_speed = odometry_.getAngular();
Expand Down

0 comments on commit 1e8bf64

Please sign in to comment.