Skip to content

Commit

Permalink
Update nav2_params and adjust motor speed coefficients
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNoobInventor committed Feb 17, 2024
1 parent 00a75ed commit 8ca9a2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lidarbot_base/src/motor_encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ void set_motor_speeds(double left_wheel_command, double right_wheel_command)
DIR right_motor_direction;

// Tune motor speeds by adjusting the command coefficients. These are dependent on the number of encoder ticks. 3000 ticks and above work well with coefficients of 1.0
double left_motor_speed = ceil(left_wheel_command * 1.75);
double right_motor_speed = ceil(right_wheel_command * 1.75);
double left_motor_speed = ceil(left_wheel_command * 1.65);
double right_motor_speed = ceil(right_wheel_command * 1.65);

// Set motor directions
if(left_motor_speed > 0)
Expand Down
4 changes: 2 additions & 2 deletions lidarbot_navigation/config/nav2_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ local_costmap:
inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer"
cost_scaling_factor: 3.0
inflation_radius: 0.75
inflation_radius: 0.40
voxel_layer:
plugin: "nav2_costmap_2d::VoxelLayer"
enabled: True
Expand Down Expand Up @@ -254,7 +254,7 @@ global_costmap:
inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer"
cost_scaling_factor: 3.0
inflation_radius: 0.75
inflation_radius: 0.40
always_send_full_costmap: True

map_server:
Expand Down

0 comments on commit 8ca9a2b

Please sign in to comment.