Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added offset in VI Control Loop, fixed gps-imu param name #19

Merged
merged 1 commit into from
Sep 11, 2020
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ namespace speedcontroller{


//Other control calibratables
#define BRAKE_HOLD_TORQUE_TWIZY (-10) //Initial torque needed to get the vehicle moving

#define BRAKE_HOLD_TORQUE_TWIZY (-10) //Torque needed to hold the vehicle still
//*****
//*****ENV200 CALIBRATIONS
//Gains for increasing speed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ int main(int argc, char **argv)
ros::NodeHandle private_nh("~");

private_nh.param<string>("sd_vehicle", _sd_vehicle, "env200");
private_nh.param<string>("sd_gps_imu", _sd_speed_source, "oxts");
private_nh.param<string>("sd_gps_imu", _sd_gps_imu, "oxts");
private_nh.param<string>("sd_speed_source", _sd_speed_source, "vehicle_can");
private_nh.param<bool>("sd_simulation_mode", _sd_simulation_mode, false);

Expand Down Expand Up @@ -160,7 +160,7 @@ int main(int argc, char **argv)

if (AutomationGranted_B || _sd_simulation_mode){

if (0 ==(AliveCounter_Z % CONTROL_LOOP)){ //We only run as per calibrated frequency
if (0 ==(AliveCounter_Z - 5 % CONTROL_LOOP)){ //We only run as per calibrated frequency, less an offset to prevent torque/steer immedietaly being applied on entry to autonomous mode.

//Calculate Steer and torque values, as well as controll feedback (PID and FeedForward Contributions to Torque Controller)
FinalDBWSteerRequest_Pc = speedcontroller::CalculateSteerRequest (TargetTwistAngular_Degps, CurrentTwistLinearSD_Mps_Final);
Expand Down