This article has participated in the activity of “New person creation Ceremony”, and started the road of digging gold creation together

Teb parameters

The teb_local_Planner package allows users to set parameters to customize behavior. These parameters fall into several categories: robot configuration, target tolerance, trajectory configuration, obstacles, optimization, planning in a unique topology, and other parameters. Select some of these to meet the requirements of base_local_Planner. Many, but not all, parameters can be modified at run time using rqt_reconfigure.

Configuration parameters

Acc_lim_x (double, default: 0.5)# Maximum translational acceleration of the robot in m/s ^ 2Acc_lim_theta (double, default: 0.5)# The maximum angular acceleration of the robot in radians per second ^ 2Max_vel_x (double, default: 0.4)# The maximum translation speed of the robot, in meters per secondMax_vel_x_backwards (double, default: 0.2)# Maximum absolute translation speed of the robot when driving backwards, in m/s. See the optimization parameter weight_kinematics_forward_driveMax_vel_theta (double, default: 0.3)# Maximum angular velocity of the robot (radians/SEC)
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# The following parameters are only relevant to automotive robots:Min_turning_radius (double, default: 0.0)# Minimum turning radius for carlike robot (differential drive robot set to zero).
# wheelbase (double, default: 1.0)
# Distance between rear axle and front axle. For rear-wheel robots, this value may be negative (only if? Cmd_angle_instead_rotvel required when the cmD_ANGLE_INSTEad_rotVEL is set to true.Cmd_angle_instead_rotvel (bool, default:false)# Replace RPM in the command speed message with the corresponding steering Angle [-pi / 2, PI / 2]. Note that it is not desirable to vary the semantics of yaw rates depending on the application. In this case, it only matches the input required by the stage simulator. The data type in ackermann_MSgs is more appropriate, but not supported by move_base. The local scheduler does not intend to send the command itself.
Copy the code

The following parameters are only relevant to the complete robot: New properties of ROS dynamics

Weight_kinematics_nh,# Note that please reduce it substantially in order to make a tradeoff between complying with longitudinal motion and not complying with lateral motion (stratification).Max_vel_y (double, default: 0.0)# Maximum starting speed of the robot (zero for nonholonomic robots!)Acc_lim_y (double, default: 0.5)# Maximum pedal acceleration of the robot
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# The following parameters are related to the encapsulation model used for optimization (see Avoiding tutorials and robot encapsulation models). New features in version 0.3

footprint_model / type(String, default: "point")# Specify the type of robot footprint model to use for optimization. The different types are "points", "circles", "lines", "two_circles" and "polygons". The type of model can significantly affect the calculation time required.Footprint_model/radius (double, default: 0.2)# This parameter only relates to the "circle" type. It contains the radius of the circle. The center of the circle is located on the robot's rotation axis.Footprint_model/line_start (double [2], default: [-0.3, 0.0])# This parameter is only relevant to the "line" type. It contains the starting coordinates of the line segment.Footprint_model/line_end (double [2], default: [0.3, 0.0])# This parameter is only relevant to the "line" type. It contains the end coordinates of the line segment.Footprint_model/front_offset (double, default: 0.2)# This parameter is only relevant to the type "two_circles". It describes how much the center of the front circle is shifted along the X-axis of the robot. Assume that the robot's rotation axis is located at [0,0].Footprint_model/front_radius (double, default: 0.2)# This parameter is only relevant to the type "two_circles". It contains the radius of the front circle.Footprint_model/rear_offset (double, default: 0.2)# This parameter is only relevant to the type "two_circles". It describes how much the rear center is shifted along the negative x axis of the robot. Assume that the robot's rotation axis is located at [0,0].Footprint_model/rear_radius (double, default: 0.2)# This parameter is only relevant to the type "two_circles". It contains the radius of the back circle.Footprint_model/vertices (double [], default: [[0.25, -0.05], [...],...] )This parameter is only relevant to the "polygon" type. It contains a list of polygon vertices (each 2d coordinate). Polygons are always closed: do not repeat the first vertex at the end.Is_footprint_dynamic (bool, default:false)# If true, update the coverage before checking the trajectory's feasibility

# target tolerance parameterXy_goal_tolerance (double, default: 0.2)# Final Euclidean distance to target location, in metersYaw_goal_tolerance (double, default: 0.2)Final allowable direction error (in radians)Free_goal_vel (bool, default:false)# Eliminate the target speed limit so that the robot can reach the target at maximum speed
Copy the code

Trajectory configuration parameter

Dt_ref (double, default: 0.3)# The required time resolution of the trajectory (since the time resolution is part of the optimization, the trajectory is not fixed to DT_REF, but if dT_REF + -dt_hysteresis is violated, the trajectory size will be adjusted between iterations.Dt_hysteresis (double, default value: 0.1)# Hysteresis for automatic resizing based on the current time resolution is typically about 10% of the recommended dT_REFMin_samples (int, default: 3)# Minimum sample size (should always be greater than 2)Global_plan_overwrite_orientation (bool, default:true)Override the direction of local subobjects provided by the global planner (because they usually only provide 2D paths)Global_plan_viapoint_sep (double, default: -0.1 (disabled))# If positive, the through-hole point (path-following pattern) is extracted from the global plan. This value determines the resolution of the reference path (if negative, it disables the minimum distance between every two continuous through-holes in the global plan). See the parameter weight_viapoint to adjust the intensity. New in version 0.4Max_global_plan_lookahead_dist (double, default: 3.0)# Specify the maximum length (cumulative Euclidean distance) of the subset of global plans considered for optimization. The actual length is then determined by a logical combination of the local cost graph size and this maximum bound. Set to zero or negative to disable this limit.Force_reinit_new_goal_dist (double, default: 1.0)Reinitialize the trajectory if the interval between updated previous targets is greater than the specified value in meters (jump start)Feasibility_check_no_poses (int, default: 4)# Specify at which position in the projected plan feasibility should be checked at each sampling interval.Publish_feedback (bool, default:false)# Publish planner feedback with a complete track and active obstacle list (only evaluation or debugging should be enabled). See the list of publishers above.Shrink_horizon_backup (bool, default:true)Allow planners to temporarily narrow the range (50%) if a problem is automatically detected (e.g., unworkable). See also the shrink_horizon_MIN_duration parameter.Allow_init_with_backwards_motion (bool, default:false)# If true, the base trajectory can be initialized by moving backwards in case the target falls behind the starting point in the local cost graph (this is only recommended if the robot is equipped with rear sensors).Exact_arc_length (bool, default:false)# If true, the planner will use exact arc lengths (-> increased CPU time) in velocity, acceleration, and turn rate calculations, otherwise Euclidean approximations will be used.shrink_horizo?? N_min_duration (double, default: 10.0)# If unfeasible tracks are detected, specify the minimum duration for shrink_horizono?? N_backup to activate the reduced horizontal line mode.
Copy the code

Obstacle parameter

Min_obstacle_dist (double, default: 0.5)# Minimum expected distance from obstacles (in meters)Include_costmap_obstacles (bool, default:true)# Specify whether local cost graph barriers should be considered. Each unit marked as an obstacle is considered a point obstacle. Therefore, do not choose the very small resolution of the cost graph, as it will increase the calculation time. In future releases, this situation will be addressed and additional apis will be provided for dynamic barriers.Costmap_obstacles_behind_robot_dist (double, default: 1.0)# Limit the occupied local cost map barriers to be considered when planning behind the robot (specify distances in meters).Obstacle_poses_affected (int, default: 30)# Each obstacle position is attached to the closest position on the track to maintain some distance. Consider other neighbors, too. Please note that this parameter may be removed in a future release because the obstacle association policy has been modified in Dynamics +. See the parameter description for Legacy_obstACLE_ASSOCIATION.Inflation_dist (double, default: pre-dynamic: 0.0, dynamic + : 0.6)# Buffer around obstacles with non-zero penalty cost (should be greater than MIN_OBSTACLE_DIST to work). Also see weight_inflation.Include_dynamic_dici (bool, default:false)# If this parameter is set to true, the movement of obstacles with non-zero velocity is predicted and considered through the isokinetic model during optimization (obstacles provided by the user of the theme obstacle or obtained from costmap_Converter)Legacy_obstacle_association (bool, default:false)# Modified the strategy of associating trajectory attitude with obstacles for optimization (see change log). You can switch to the old/previous policy by setting this parameter to true. Old strategy: For each obstacle, find the nearest TEB position; New strategy: For each pose, find only "relevant" obstacles.Obstacle_association_force_inclusion_factor (double, default: 1.5)# The non-legacy obstacle association strategy attempts to connect only related obstacles with discrete trajectories in the optimization process. However, all obstacles within the specified distance must be included (as multiples of min_OBSTACLE_DIST). For example, select 2.0 to force consideration of obstacles within the radius of 2.0 * min_OBSTacle_dist. [Use this parameter only when legacy_OBSTACLE_association is false]Obstacle_association_cutoff_factor (double, default: 5)# See OBSTACle_association_force_inclusion_factor, but exceed [value] multiples * min_OBSTACle_dist All obstacles, ignored during optimization. Start with the barrier_association_force_inclusion_factor parameter. [Use this parameter only when legacy_OBSTACLE_association is false]
# The following parameters are relevant only if the Costmap_CONVERTER plug-in is required (see tutorial) :Costmap_converter_plugin (string, default: "")Define the plug-in name to convert the cost diagram cells into points/lines/polygons. Set an empty string to disable conversion so that all cells are treated as point barriers.Costmap_converter_spin_thread (bool, default:true)# If set to true, the CostMap converter will call its callback queue in another thread.Costmap_converter_rate (double, default: 5.0)# rate, which defines how often the CostMAP_CONVERTER plug-in processes the current cost graph (this value should not be much higher than the cost graph update rate) [in Hz].
Copy the code

To optimize the parameters

No_inner_iterations (int, default: 5)# The actual number of solver iterations called in each outer loop iteration. See parameter no_outer_iterations.No_outer_iterations (int, default: 4)# Each external iteration of the loop automatically resize the track based on the required time resolution DT_REF and calls the internal optimizer (execute no_inner_iterations). Thus, the total number of solver iterations in each planning cycle is the product of two values.Penalty_epsilon (double, default: 0.1)# Add a small margin of safety for the penalty function to implement the hard constraint approximationWeight_max_vel_x (double, default: 2.0)The optimal weight satisfies the maximum allowable translation speedWeight_max_vel_theta (double, default: 1.0)The optimal weight satisfies the maximum allowable angular velocityWeight_acc_lim_x (double, default: 1.0)The optimal weight satisfies the maximum allowable translational accelerationWeight_acc_lim_theta (double, default: 1.0)The optimal weight satisfies the maximum allowable angular accelerationWeight_kinematics_nh (double, default: 1000.0)# The optimal weight to satisfy the nonholonomic kinematics (this parameter must be high because the kinematics equations constitute an equality constraint, and even a value of 1000 does not imply a poor matrix condition due to a small "original" cost value compared to other costs).Weight_kinematics_forward_drive (double, default: 1.0)Optimization weights are used to force the robot to select only the forward direction (forward speed). A smaller weight (e.g. 1.0) still allows for rearward driving. A value of about 1000 almost prevents backward driving (but is not guaranteed).Weight_kinematics_turning_radius (double, default: 1.0)# Optimize the weight to achieve a minimum turning radius (only for automotive robots).Weight_optimaltime (double, default: 1.0)Optimal weight for shrinkage trajectory transition/execution timeWeight_obstacle (double, default: 50.0)# Optimize weight to maintain minimum distance from obstaclesWeight_viapoint (double, default: 1.0)Optimize the weight to minimize the distance to the through hole (reference paths respectively). New in version 0.4Weight_inflation (double, default: 0.1)# Optimized weight of inflation penalty (should be small).Weight_adapt_factor (double, default: 2.0)In each external TEB iteration, some special weights (currently weight_obstacle) will be scaled repeatedly by this factor (weight_new = weight_old * factor). Iteratively increasing weights rather than setting large prior values leads to better numerical conditions for the underlying optimization problem.
Copy the code

Parallel programming in unique topologies

Enable_homotopy_class_planning (bool, default:true)# Enable parallel planning in unique topologies (requiring more CPU resources due to simultaneous optimization of multiple tracks)Enable_multithreading (bool, default:true)Activate multiple threads to plan each trace in different threadsMax_number_classes (int, default: 4)# specify the maximum number of different trajectories to consider (limit computational effort)Selection_cost_hysteresis (double, default: 1.0)# Specify how much track cost the new candidate must have to select the previous track (select if new_cost Selection_obst_cost_scale (double, default: 100.0)# Additional scaling of obstacle cost conditions for selecting only the "best" candidate.Selection_viapoint_cost_scale (double, default: 1.0)# Additional scaling of the through-hole cost clause only to select the "best" candidate. New in version 0.4Selection_alternative_time_cost (bool, default:false)# If true, replace the time cost (sum of the squares of the time differences) with the total transition time (sum of the time differences).Roadmap_graph_no_samples (int, default: 15)# specify the number of samples to generate to create the roadmapRoadmap_graph_area_width (double, default: 6)# Sample random key points/waypoints in the rectangular area between the starting point and the target. Specifies the width of the zone in meters.H_signature_prescaler (double, default: 1.0)# Scale internal parameter (H-signature), used to distinguish homotopy classes. Caution: reduce this parameter only when you see a problem with too many obstacles in the local cost graph. Do not set it too low or obstacles will not be distinguishable from each other (0.2 < value <= 1).H_signature_threshold (double, default: 0.1)# If the difference between the real and complex parts is below the specified threshold, the two H signatures are assumed to be equal.Obstacle_heading_threshold (double, default: 1.0)# Specify the value of the scalar product between the obstacle course and the target course to take them into consideration for exploration.Visualize_hc_graph (bool, default:false)# Visualize graphics created to explore unique tracks (check mark messages in RVIZ)Viapoints_all_candidates (bool, default:true)# If true, attach all tracks of different topologies to the set of through-holes, otherwise, only tracks that share the same topology as the initial/global plan are connected to them (not valid for test_Optim_node). New in version 0.4Switching_blocking_period (double, default: 0.0)# specifies the duration (in seconds) of termination before switching to the new equivalent class is allowed.
Copy the code

Miscellaneous parameters

Odom_topic (string, default: "odom")The topic name of the ranging message, provided by the robot driver or emulator.Map_frame (string, default: "odom")# Global planning framework (In the case of static maps, you usually have to change this parameter to "/ map".
Copy the code

The roadmap

Certain features and improvements currently planned for the future. Add and improve safety features in the case of unavoidable obstacles (for example, obstacles that are actually located near the target). Perform an appropriate escape act. Improvements/solutions for cases where the planner oscillates between multiple locally optimal solutions (not based on topology, but due to occurring noise etc.).