rst-tu-dortmund / teb_local_planner

An optimal trajectory planner considering distinctive topologies for mobile robots based on Timed-Elastic-Bands (ROS Package)
http://wiki.ros.org/teb_local_planner
BSD 3-Clause "New" or "Revised" License
1.03k stars 546 forks source link

Path taken by TEB is not showing & costmap conversion is not working #381

Closed tiara567 closed 2 years ago

tiara567 commented 2 years ago

Global planner : navfn Local planner : TEB

the path taken by the TEB is not showing. Please see the following video. Screencast from 09-06-2022 10_32_39 AM.webm

It think that the TEB should shows its way (small red arrows). WhatsApp Image 2022-09-06 at 10 55 26

Besides, i have tried to plugin the map converter (point obstacle to polygon). However it is still not working (same video) before error: No costmap conversion plugin specified. All occupied costmap cells are treaten as point obstacles. after : Costmap conversion plugin costmap_converter::CostmapToPolygonsDBSMCCH loaded.

jcmonteiro commented 2 years ago

Could you share your parameter files?

tiara567 commented 2 years ago

Here is it.

costmap_common_params_burger.yaml

obstacle_range: 3.0 raytrace_range: 3.5

footprint: [[-0.105, -0.105], [-0.105, 0.105], [0.041, 0.105], [0.041, -0.105]]

robot_radius: 0.105

inflation_radius: 1.0 cost_scaling_factor: 3.0

map_type: costmap observation_sources: scan scan: {sensor_frame: base_scan, data_type: LaserScan, topic: scan, marking: true, clearing: true}

local_costmap_params.yaml

local_costmap: global_frame: odom robot_base_frame: base_footprint

update_frequency: 10.0 publish_frequency: 10.0 transform_tolerance: 0.5

static_map: false
rolling_window: true width: 3 height: 3 resolution: 0.05

global_costmap_params.yaml

global_costmap: global_frame: map robot_base_frame: base_footprint

update_frequency: 10.0 publish_frequency: 10.0 transform_tolerance: 0.5

static_map: true

move_base_params

shutdown_costmaps: false controller_frequency: 10.0 planner_patience: 5.0 controller_patience: 15.0 conservative_reset_dist: 3.0 planner_frequency: 5.0 oscillation_timeout: 10.0 oscillation_distance: 0.2

TebLocalPlannerROS:

odom_topic: odom map_frame: /odom

Costmap converter plugin
costmap_converter_plugin: "costmap_converter::CostmapToPolygonsDBSMCCH" costmap_converter_spin_thread: True costmap_converter_rate: 5

Configure plugins (namespace move_base/TebLocalPlannerROS/PLUGINNAME) The parameters must be added for each plugin separately costmap_converter/CostmapToLinesDBSRANSAC: cluster_max_distance: 0.4 cluster_min_pts: 2 ransac_inlier_distance: 0.15 ransac_min_inliers: 10 ransac_no_iterations: 2000 ransac_remainig_outliers: 3 ransac_convert_outlier_pts: True ransac_filter_remaining_outlier_pts: False convex_hull_min_pt_separation: 0.1

Trajectory teb_autosize : true dt_ref : 0.3 dt_hysteresis : 0.1 min_samples : 3 max_samples : 500 global_plan_overwrite_orientation : true allow_init_with_backwards_motion : false global_plan_viapoint_sep : -1 via_points_ordered : false max_global_plan_lookahead_dist : 1 global_plan_prune_distance : 1 exact_arc_length : false force_reinit_new_goal_dist : 1 force_reinit_new_goal_angular : 0.5 * M_PI feasibility_check_no_poses : 5 publish_feedback : false min_resolution_collision_check_angular : M_PI control_look_ahead_poses : 1 prevent_look_ahead_poses_near_goal : 0

Robot

max_vel_x : 0.4 max_vel_x_backwards : 0.2 max_vel_y : 0.0 max_vel_trans : 0.0 max_vel_theta : 0.3 acc_lim_x : 0.2 acc_lim_y : 0.2 acc_lim_theta : 0.5 min_turning_radius : 0 wheelbase : 1.0 cmd_angle_instead_rotvel : false is_footprint_dynamic : false use_proportional_saturation : false

GoalTolerance

xy_goal_tolerance : 0.2 yaw_goal_tolerance : 0.2 free_goal_vel : false trans_stopped_vel : 0.1 theta_stopped_vel : 0.1 complete_global_plan : true

Obstacles

min_obstacle_dist : 0.1 inflation_dist : 0.15 dynamic_obstacle_inflation_dist : 0.15 include_dynamic_obstacles : true include_costmap_obstacles : true costmap_obstacles_behind_robot_dist : 1.5 obstacle_poses_affected : 25 legacy_obstacle_association : false obstacle_association_force_inclusion_factor : 1.5 obstacle_association_cutoff_factor : 5 costmap_converter_plugin : "" costmap_converter_spin_thread : true costmap_converter_rate : 5 obstacle_proximity_ratio_max_vel : 1 obstacle_proximity_lower_bound : 0 obstacle_proximity_upper_bound : 0.5

Optimization

no_inner_iterations : 5 no_outer_iterations : 4 optimization_activate : true optimization_verbose : false penalty_epsilon : 0.1 weight_max_vel_x : 2 weight_max_vel_y : 2 weight_max_vel_theta : 1 weight_acc_lim_x : 1.0 weight_acc_lim_y : 1.0 weight_acc_lim_theta : 1 weight_kinematics_nh : 1000 weight_kinematics_forward_drive : 1 weight_kinematics_turning_radius : 1 weight_optimaltime : 1 weight_shortest_path : 0 weight_obstacle : 100 weight_inflation : 0.1 weight_dynamic_obstacle : 50 weight_dynamic_obstacle_inflation : 0.1 weight_velocity_obstacle_ratio : 0 weight_viapoint : 1 weight_prefer_rotdir : 50

weight_adapt_factor : 2.0 obstacle_cost_exponent : 4.0

Homotopy Class Planner

enable_homotopy_class_planning : true enable_multithreading : true simple_exploration : false max_number_classes : 5 selection_cost_hysteresis : 1.0 selection_prefer_initial_plan : 0.95 selection_obst_cost_scale : 100.0 selection_viapoint_cost_scale : 1.0 selection_alternative_time_cost : false selection_dropping_probability : 0.0

obstacle_keypoint_offset : 0.1 obstacle_heading_threshold : 0.45 roadmap_graph_no_samples : 15 roadmap_graph_area_width : 6 // [m] roadmap_graph_area_length_scale : 1.0 h_signature_prescaler : 1 h_signature_threshold : 0.1 switching_blocking_period : 0.0

viapoints_all_candidates : true

visualize_hc_graph : false visualize_with_time_as_z_axis_scale : 0.0 delete_detours_backwards : true detours_orientation_tolerance : M_PI / 2.0 length_start_orientation_vector : 0.4 max_ratio_detours_duration_best_duration : 3.0

Recovery

shrink_horizon_backup : true shrink_horizon_min_duration : 10 oscillation_recovery : true oscillation_v_eps : 0.1 oscillation_omega_eps : 0.1 oscillation_recovery_min_duration : 10 oscillation_filter_duration : 10

costmap_converter_params.yaml

########################################################################################### NOTE: Costmap conversion is experimental. Its purpose is to combine many point ## obstales into clusters, computed in a separate thread in order to improve the overall ## efficiency of local planning. However, the implemented conversion algorithms are in a ## very early stage of development. Contributions are welcome! ## ###########################################################################################

TebLocalPlannerROS:

Costmap converter plugin
costmap_converter_plugin: "costmap_converter::CostmapToPolygonsDBSMCCH"

costmap_converter_plugin: "costmap_converter::CostmapToLinesDBSRANSAC"

costmap_converter_plugin: "costmap_converter::CostmapToLinesDBSMCCH"

costmap_converter_plugin: "costmap_converter::CostmapToPolygonsDBSConcaveHull"

costmap_converter_spin_thread: True costmap_converter_rate: 5

Configure plugins (namespace move_base/costmap_to_lines or move_base/costmap_to_polygons) costmap_converter/CostmapToLinesDBSRANSAC, costmap_converter/CostmapToLinesDBSMCCH, costmap_converter/CostmapToPolygonsDBSMCCH costmap_converter/CostmapToLinesDBSRANSAC: cluster_max_distance: 0.4 cluster_min_pts: 2 ransac_inlier_distance: 0.15 ransac_min_inliers: 10 ransac_no_iterations: 2000 ransac_remainig_outliers: 3 ransac_convert_outlier_pts: True ransac_filter_remaining_outlier_pts: False convex_hull_min_pt_separation: 0.1

tiara567 commented 2 years ago

here my launch file move_base.launch

tiara567 commented 2 years ago

here is my launch file turtlebot3_navigation.launch

jcmonteiro commented 2 years ago

You have publish_feedback set to false. Could you change it to true and see if it helps?

tiara567 commented 2 years ago

I have tried to change it to "true" but still nothing changes. Yesterday, i reconfigured my rviz parameter, it change to this. PLease se following video: Screencast from 09-07-2022 04:31:35 PM.webm

The path of TEB planner is shown ( yellow path, without the red-small arrow) and the costmap has changed but the polygon has not shown yet. Screenshot from 2022-09-08 11-06-08

jcmonteiro commented 2 years ago

Check your RViz configuration then, as it seems like everything is fine from TEB's side. Make sure you are using the correct plugin to visualize the trajectory and that it is configured to show the arrows.

tiara567 commented 2 years ago

Attached is the configuration of my rviz setting. Which one that need to be configured, Sir?

Panels:

jcmonteiro commented 2 years ago

If you play around with the rviz/Path plugin you use to visualize TEB you should be able to figure it out.

tiara567 commented 2 years ago

Yes, Sir. It's worked. I add TEB visualization by topic on rviz. Screenshot from 2022-09-09 13-33-25 Screencast from 09-09-2022 01:34:36 PM.webm

Thank you for the insight. I hope it can help others too