diff --git a/launch/autoX.launch b/launch/autoX.launch index a0517b7..76a14cd 100644 --- a/launch/autoX.launch +++ b/launch/autoX.launch @@ -1,7 +1,7 @@ - + diff --git a/params/dyn_autox.yaml b/params/dyn_autox.yaml index c279076..d4bdf67 100644 --- a/params/dyn_autox.yaml +++ b/params/dyn_autox.yaml @@ -35,8 +35,8 @@ dictitems: state: [] parent: 0 q_mu: 0.01 - q_n: 150.0 - q_nN: 150.0 + q_n: 550.0 + q_nN: 550.0 q_s: 10.0 q_sN: 10.0 q_slack_track: 1000.0 @@ -47,8 +47,8 @@ dictitems: state: [] latency: 5 q_mu: 0.01 - q_n: 150.0 - q_nN: 150.0 + q_n: 550.0 + q_nN: 550.0 q_s: 10.0 q_sN: 10.0 q_slack_track: 1000.0 diff --git a/params/tailored_mpc.yaml b/params/tailored_mpc.yaml index 67f43dd..afc12a4 100644 --- a/params/tailored_mpc.yaml +++ b/params/tailored_mpc.yaml @@ -41,6 +41,6 @@ MPC: rk4_t: 0.025 #[s] Runge Kutta integration time Nthreads: 5 # Number of threads - nPlanning: 1500 # n points saved from the planner + nPlanning: 2000 # n points saved from the planner plannerAccuracy: 0.025 # [m] distance accuracy of the planner (distance between given points) nSearchAhead: 5 # [m] distance ahead where we will look for the closer point to the car (int) diff --git a/src/main.cpp b/src/main.cpp index 5549e45..4526919 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,15 +19,16 @@ void dynamicCallback(tailored_mpc::dynamicConfig &config, uint32_t level, MPC* m void my_SIGhandler(int sig){ - if(ros::master::check()){ - as_msgs::CarCommands msgCommands; - msgCommands.motor = -1.0; // no one will read this value, but what if.. - msgCommands.steering = 0.0; - msgCommands.Mtv = 0.0; - for(int i=0; i<5; i++){ - pubCommands.publish(msgCommands); - ros::Duration(0.05).sleep(); - } + // More safe if the car keeps the last steering command sent before shutdown ??? + if(ros::master::check()){ + // as_msgs::CarCommands msgCommands; + // msgCommands.motor = -1.0; // no one will read this value, but what if.. + // msgCommands.steering = 0.0; + // msgCommands.Mtv = 0.0; + // for(int i=0; i<5; i++){ + // pubCommands.publish(msgCommands); + // ros::Duration(0.05).sleep(); + // } ROS_ERROR("MPC says Goodbye :)"); } ros::shutdown();