提交 c629c17d 编写于 作者: J JasonZhou404 提交者: Qi Luo

Planning: OpenSpace: change proto name

上级 88cf765e
......@@ -41,18 +41,18 @@ dual_variable_warm_start_config : {
}
distance_approach_config : {
weight_u : 0.0
weight_u : 0.0
weight_u_rate : 0.02
weight_u_rate : 0.02
weight_state : 1.0
weight_state : 1.0
weight_state : 2.0
weight_state : 0.0
weight_stitching : 0.02
weight_stitching : 0.02
weight_time : 8.0
weight_time : 16.0
weight_steer : 0.0
weight_a : 0.0
weight_steer_rate : 0.02
weight_a_rate : 0.02
weight_x : 1.0
weight_y : 1.0
weight_phi : 2.0
weight_v : 0.0
weight_steer_stitching : 0.02
weight_a_stitching : 0.02
weight_first_order_time : 8.0
weight_second_order_time : 16.0
min_safety_distance : 0.0
max_speed_forward : 2.0
max_speed_reverse : 1.0
......
......@@ -70,18 +70,20 @@ DistanceApproachIPOPTInterface::DistanceApproachIPOPTInterface(
planner_open_space_config_.CopyFrom(planner_open_space_config);
distance_approach_config_ =
planner_open_space_config_.distance_approach_config();
weight_state_x_ = distance_approach_config_.weight_state(0);
weight_state_y_ = distance_approach_config_.weight_state(1);
weight_state_phi_ = distance_approach_config_.weight_state(2);
weight_state_v_ = distance_approach_config_.weight_state(3);
weight_input_steer_ = distance_approach_config_.weight_u(0);
weight_input_a_ = distance_approach_config_.weight_u(1);
weight_rate_steer_ = distance_approach_config_.weight_u_rate(0);
weight_rate_a_ = distance_approach_config_.weight_u_rate(1);
weight_stitching_steer_ = distance_approach_config_.weight_stitching(0);
weight_stitching_a_ = distance_approach_config_.weight_stitching(1);
weight_first_order_time_ = distance_approach_config_.weight_time(0);
weight_second_order_time_ = distance_approach_config_.weight_time(1);
weight_state_x_ = distance_approach_config_.weight_x();
weight_state_y_ = distance_approach_config_.weight_y();
weight_state_phi_ = distance_approach_config_.weight_phi();
weight_state_v_ = distance_approach_config_.weight_v();
weight_input_steer_ = distance_approach_config_.weight_steer();
weight_input_a_ = distance_approach_config_.weight_a();
weight_rate_steer_ = distance_approach_config_.weight_steer_rate();
weight_rate_a_ = distance_approach_config_.weight_a_rate();
weight_stitching_steer_ = distance_approach_config_.weight_steer_stitching();
weight_stitching_a_ = distance_approach_config_.weight_a_stitching();
weight_first_order_time_ =
distance_approach_config_.weight_first_order_time();
weight_second_order_time_ =
distance_approach_config_.weight_second_order_time();
min_safety_distance_ = distance_approach_config_.min_safety_distance();
max_steer_angle_ =
vehicle_param_.max_steer_angle() / vehicle_param_.steer_ratio();
......@@ -1317,12 +1319,12 @@ void DistanceApproachIPOPTInterface::finalize_solution(
int time_index = time_start_index_;
int dual_l_index = l_start_index_;
int dual_n_index = n_start_index_;
// 1. state variables, 4 * [0, horizon]
// 2. control variables, 2 * [0, horizon_-1]
// 3. sampling time variables, 1 * [0, horizon_]
// 4. dual_l obstacles_edges_sum_ * [0, horizon]
// 5. dual_n obstacles_num * [0, horizon]
#pragma omp parallel num_threads(4)
// 1. state variables, 4 * [0, horizon]
// 2. control variables, 2 * [0, horizon_-1]
// 3. sampling time variables, 1 * [0, horizon_]
// 4. dual_l obstacles_edges_sum_ * [0, horizon]
// 5. dual_n obstacles_num * [0, horizon]
#pragma omp parallel num_threads(4)
for (int i = 0; i < horizon_; ++i) {
state_result_(0, i) = x[state_index];
state_result_(1, i) = x[state_index + 1];
......
......@@ -53,20 +53,27 @@ message DualVariableWarmStartConfig {
message DistanceApproachConfig {
// Distance approach weight configs
repeated double weight_u = 1;
repeated double weight_u_rate = 2;
repeated double weight_state = 3;
repeated double weight_stitching = 4;
repeated double weight_time = 5;
optional double min_safety_distance = 6 [default = 0.0];
optional double max_speed_forward = 7 [default = 3.0];
optional double max_speed_reverse = 8 [default = 2.0];
optional double max_acceleration_forward = 9 [default = 2.0];
optional double max_acceleration_reverse = 10 [default = 2.0];
optional double min_time_sample_scaling = 11 [default = 0.1];
optional double max_time_sample_scaling = 12 [default = 10.0];
optional bool use_fix_time = 13 [default = false];
optional IpoptConfig ipopt_config = 14;
optional double weight_steer = 1;
optional double weight_a = 2;
optional double weight_steer_rate = 3;
optional double weight_a_rate = 4;
optional double weight_x = 5;
optional double weight_y = 6;
optional double weight_phi = 7;
optional double weight_v = 8;
optional double weight_steer_stitching = 9;
optional double weight_a_stitching = 10;
optional double weight_first_order_time = 11;
optional double weight_second_order_time = 12;
optional double min_safety_distance = 13 [default = 0.0];
optional double max_speed_forward = 14 [default = 3.0];
optional double max_speed_reverse = 15 [default = 2.0];
optional double max_acceleration_forward = 16 [default = 2.0];
optional double max_acceleration_reverse = 17 [default = 2.0];
optional double min_time_sample_scaling = 18 [default = 0.1];
optional double max_time_sample_scaling = 19 [default = 10.0];
optional bool use_fix_time = 20 [default = false];
optional IpoptConfig ipopt_config = 21;
}
message IpoptConfig {
......
......@@ -41,18 +41,18 @@ dual_variable_warm_start_config : {
}
distance_approach_config : {
weight_u : 0.0
weight_u : 0.0
weight_u_rate : 0.02
weight_u_rate : 0.02
weight_state : 1.0
weight_state : 1.0
weight_state : 2.0
weight_state : 0.0
weight_stitching : 0.02
weight_stitching : 0.02
weight_time : 8.0
weight_time : 16.0
weight_steer : 0.0
weight_a : 0.0
weight_steer_rate : 0.02
weight_a_rate : 0.02
weight_x : 1.0
weight_y : 1.0
weight_phi : 2.0
weight_v : 0.0
weight_steer_stitching : 0.02
weight_a_stitching : 0.02
weight_first_order_time : 8.0
weight_second_order_time : 16.0
min_safety_distance : 0.0
max_speed_forward : 2.0
max_speed_reverse : 1.0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册