aron_conversions_teb.cpp
Go to the documentation of this file.
1 
2 #include <armarx/navigation/local_planning/aron/TimedElasticBands.aron.generated.h>
3 
4 #include "aron_conversions.h"
5 #include <teb_local_planner/teb_config.h>
6 
8 {
9 
10  void
11  toTebCfg(const arondto::TimedElasticBandsParams& dto, ::teb_local_planner::TebConfig& bo)
12  {
13  bo.pse.pse_costum_obstacle_penalties = dto.teb_config.pse.pse_costum_obstacle_penalties;
14  bo.pse.pse_costum_obstacle_penalties_dynamic =
15  dto.teb_config.pse.pse_costum_obstacle_penalties_dynamic;
16  bo.pse.weight_costmap = dto.teb_config.pse.weight_costmap;
17  bo.pse.weight_global_path_position = dto.teb_config.pse.weight_global_path_position;
18  bo.pse.weight_global_path_orientation = dto.teb_config.pse.weight_global_path_orientation;
19  bo.pse.lrk_use_alternative_approach = dto.teb_config.pse.lrk_use_alternative_approach;
20  bo.pse.lrk_enable_collision_check = dto.teb_config.pse.lrk_enable_collision_check;
21  bo.pse.hybrid_homotopy_calculation = dto.teb_config.pse.hybrid_homotopy_calculation;
22  bo.pse.robot_diff_circumscribed_inscribed_radius =
23  dto.teb_config.pse.robot_diff_circumscribed_inscribed_radius;
24 
25  // Trajectory
26  bo.trajectory.teb_autosize = bo.trajectory.teb_autosize;
27  bo.trajectory.dt_ref = dto.teb_config.trajectory.dt_ref;
28  bo.trajectory.dt_hysteresis = dto.teb_config.trajectory.dt_hysteresis;
29  bo.trajectory.min_samples = dto.teb_config.trajectory.min_samples;
30  bo.trajectory.max_samples = dto.teb_config.trajectory.max_samples;
31  bo.trajectory.global_plan_overwrite_orientation =
32  dto.teb_config.trajectory.global_plan_overwrite_orientation;
33  bo.trajectory.allow_init_with_backwards_motion =
34  dto.teb_config.trajectory.allow_init_with_backwards_motion;
35  bo.trajectory.exact_arc_length = dto.teb_config.trajectory.exact_arc_length;
36  bo.trajectory.force_reinit_new_goal_dist =
37  dto.teb_config.trajectory.force_reinit_new_goal_dist;
38  bo.trajectory.force_reinit_new_goal_angular =
39  dto.teb_config.trajectory.force_reinit_new_goal_angular;
40  bo.trajectory.feasibility_check_no_poses =
41  dto.teb_config.trajectory.feasibility_check_no_poses;
42  bo.trajectory.feasibility_check_lookahead_distance =
43  dto.teb_config.trajectory.feasibility_check_lookahead_distance;
44  bo.trajectory.min_resolution_collision_check_angular =
45  dto.teb_config.trajectory.min_resolution_collision_check_angular;
46 
47  // Robot
48  bo.robot.max_vel_x = dto.teb_config.robot.max_vel_x;
49  bo.robot.max_vel_x_backwards = dto.teb_config.robot.max_vel_x_backwards;
50  bo.robot.max_vel_y = dto.teb_config.robot.max_vel_y;
51  bo.robot.max_vel_trans = dto.teb_config.robot.max_vel_trans;
52  bo.robot.max_vel_theta = dto.teb_config.robot.max_vel_theta;
53  bo.robot.acc_lim_x = dto.teb_config.robot.acc_lim_x;
54  bo.robot.acc_lim_y = dto.teb_config.robot.acc_lim_y;
55  bo.robot.acc_lim_theta = dto.teb_config.robot.acc_lim_theta;
56  bo.robot.min_turning_radius = dto.teb_config.robot.min_turning_radius;
57 
58  // GoalTolerance
59  bo.goal_tolerance.xy_goal_tolerance = dto.teb_config.goal_tolerance.xy_goal_tolerance;
60 
61  // Obstacles
62  bo.obstacles.min_obstacle_dist = dto.teb_config.obstacles.min_obstacle_dist;
63  bo.obstacles.inflation_dist = dto.teb_config.obstacles.inflation_dist;
64  bo.obstacles.dynamic_obstacle_inflation_dist =
65  dto.teb_config.obstacles.dynamic_obstacle_inflation_dist;
66  bo.obstacles.include_dynamic_obstacles = dto.teb_config.obstacles.include_dynamic_obstacles;
67  bo.obstacles.obstacle_association_force_inclusion_factor =
68  dto.teb_config.obstacles.obstacle_association_force_inclusion_factor;
69  bo.obstacles.obstacle_association_cutoff_factor =
70  dto.teb_config.obstacles.obstacle_association_cutoff_factor;
71  bo.obstacles.obstacle_proximity_ratio_max_vel =
72  dto.teb_config.obstacles.obstacle_proximity_ratio_max_vel;
73  bo.obstacles.obstacle_proximity_lower_bound =
74  dto.teb_config.obstacles.obstacle_proximity_lower_bound;
75  bo.obstacles.obstacle_proximity_upper_bound =
76  dto.teb_config.obstacles.obstacle_proximity_upper_bound;
77 
78  // Optimization
79  bo.optim.no_inner_iterations = dto.teb_config.optim.no_inner_iterations;
80  bo.optim.no_outer_iterations = dto.teb_config.optim.no_outer_iterations;
81  bo.optim.optimization_activate = dto.teb_config.optim.optimization_activate;
82  bo.optim.optimization_verbose = dto.teb_config.optim.optimization_verbose;
83  bo.optim.penalty_epsilon = dto.teb_config.optim.penalty_epsilon;
84  bo.optim.weight_max_vel_x = dto.teb_config.optim.weight_max_vel_x;
85  bo.optim.weight_max_vel_y = dto.teb_config.optim.weight_max_vel_y;
86  bo.optim.weight_max_vel_theta = dto.teb_config.optim.weight_max_vel_theta;
87  bo.optim.weight_acc_lim_x = dto.teb_config.optim.weight_acc_lim_x;
88  bo.optim.weight_acc_lim_y = dto.teb_config.optim.weight_acc_lim_y;
89  bo.optim.weight_acc_lim_theta = dto.teb_config.optim.weight_acc_lim_theta;
90  bo.optim.weight_kinematics_nh = dto.teb_config.optim.weight_kinematics_nh;
91  bo.optim.weight_kinematics_forward_drive =
92  dto.teb_config.optim.weight_kinematics_forward_drive;
93  bo.optim.weight_kinematics_turning_radius =
94  dto.teb_config.optim.weight_kinematics_turning_radius;
95  bo.optim.weight_optimaltime = dto.teb_config.optim.weight_optimaltime;
96  bo.optim.weight_shortest_path = dto.teb_config.optim.weight_shortest_path;
97  bo.optim.weight_obstacle = dto.teb_config.optim.weight_obstacle;
98  bo.optim.weight_inflation = dto.teb_config.optim.weight_inflation;
99  bo.optim.weight_dynamic_obstacle = dto.teb_config.optim.weight_dynamic_obstacle;
100  bo.optim.weight_dynamic_obstacle_inflation =
101  dto.teb_config.optim.weight_dynamic_obstacle_inflation;
102  bo.optim.weight_velocity_obstacle_ratio =
103  dto.teb_config.optim.weight_velocity_obstacle_ratio;
104  bo.optim.weight_viapoint = dto.teb_config.optim.weight_viapoint;
105  bo.optim.weight_prefer_rotdir = dto.teb_config.optim.weight_prefer_rotdir;
106  bo.optim.weight_adapt_factor = dto.teb_config.optim.weight_adapt_factor;
107  bo.optim.obstacle_cost_exponent = dto.teb_config.optim.obstacle_cost_exponent;
108 
109  // Homotopy Class Planner
110  bo.hcp.enable_multithreading = dto.teb_config.hcp.enable_multithreading;
111  bo.hcp.simple_exploration = dto.teb_config.hcp.simple_exploration;
112  bo.hcp.max_number_classes = dto.teb_config.hcp.max_number_classes;
113  bo.hcp.max_number_plans_in_current_class =
114  dto.teb_config.hcp.max_number_plans_in_current_class;
115  bo.hcp.selection_cost_hysteresis = dto.teb_config.hcp.selection_cost_hysteresis;
116  bo.hcp.selection_obst_cost_scale = dto.teb_config.hcp.selection_obst_cost_scale;
117  bo.hcp.selection_viapoint_cost_scale = dto.teb_config.hcp.selection_viapoint_cost_scale;
118  bo.hcp.selection_alternative_time_cost = dto.teb_config.hcp.selection_alternative_time_cost;
119  bo.hcp.selection_dropping_probability = dto.teb_config.hcp.selection_dropping_probability;
120  bo.hcp.switching_blocking_period = dto.teb_config.hcp.switching_blocking_period;
121 
122  bo.hcp.obstacle_heading_threshold = dto.teb_config.hcp.obstacle_heading_threshold;
123  bo.hcp.roadmap_graph_no_samples = dto.teb_config.hcp.roadmap_graph_no_samples;
124  bo.hcp.roadmap_graph_area_width = dto.teb_config.hcp.roadmap_graph_area_width;
125  bo.hcp.roadmap_graph_area_length_scale = dto.teb_config.hcp.roadmap_graph_area_length_scale;
126  bo.hcp.h_signature_prescaler = dto.teb_config.hcp.h_signature_prescaler;
127  bo.hcp.h_signature_threshold = dto.teb_config.hcp.h_signature_threshold;
128 
129  bo.hcp.viapoints_all_candidates = dto.teb_config.hcp.viapoints_all_candidates;
130 
131  bo.hcp.delete_detours_backwards = dto.teb_config.hcp.delete_detours_backwards;
132  bo.hcp.detours_orientation_tolerance = dto.teb_config.hcp.detours_orientation_tolerance;
133  bo.hcp.length_start_orientation_vector = dto.teb_config.hcp.length_start_orientation_vector;
134  bo.hcp.max_ratio_detours_duration_best_duration =
135  dto.teb_config.hcp.max_ratio_detours_duration_best_duration;
136 
137  bo.checkParameters();
138  }
139 
140 
141 } // namespace armarx::navigation::local_planning
armarx::navigation::local_planning
This file is part of ArmarX.
Definition: fwd.h:35
armarx::navigation::local_planning::toTebCfg
void toTebCfg(const arondto::TimedElasticBandsParams &dto, ::teb_local_planner::TebConfig &bo)
Definition: aron_conversions_teb.cpp:11
armarx::aron::bo
const std::optional< BoT > & bo
Definition: aron_conversions.h:174
aron_conversions.h