Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sunray/LineTracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@ void trackLine(bool runControl){
//CONSOLE.println(angular/PI*180.0);
if (maps.trackReverse) linear *= -1; // reverse line tracking needs negative speed
// restrict steering angle for stanley (not required anymore after last state estimation bugfix)
//if (!SMOOTH_CURVES) angular = max(-PI/16, min(PI/16, angular));
if (STANLEY_STEERING_RESTRICTION) {
if (!SMOOTH_CURVES) angular = max(-PI/16, min(PI/16, angular));
}
}
// check some pre-conditions that can make linear+angular speed zero
if (fixTimeout != 0){
Expand Down
1 change: 1 addition & 0 deletions sunray/config_example.h
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ Also, you may choose the serial port below for serial monitor output (CONSOLE).
#define STANLEY_CONTROL_P_SLOW 3.0 // 3.0 for path tracking control (angular gain) when docking tracking
#define STANLEY_CONTROL_K_SLOW 0.1 // 0.1 for path tracking control (lateral gain) when docking tracking

#define STANLEY_STEERING_RESTRICTION false // restrict steering angle for stanley (set to true to activate)

// ----- other options --------------------------------------------

Expand Down