TebLocalPlanner stalling out on Jetson Xavier
I am running the Teb Local Planner on my navigation stack. When I run it on our computers (mostly intel based laptops) it works fine, however when i run it on the robot, which has a Jetson Xavier ARM processor, movebase maxes out a core and gets a load avg of 12 and it instantly stalls and does not move. I tried to swap out planners and used the Trajectory planner, and it ran fine, however our robot has ackerman steering so we really need to use Teb Local Planner.
I went through the Teb Local Planner tutorial and changed all of the optimization params including the multi-threading ones. I also ran the teb local planner tutorial on the xavier and it seemed to work fine.
Here is the config for the local planner
TebLocalPlannerROS:
odom_topic: odom
map_frame: /map
# Trajectory
teb_autosize: True
dt_ref: .9
dt_hysteresis: 0.1
global_plan_overwrite_orientation: True
max_global_plan_lookahead_dist: 3.0
feasibility_check_no_poses: 5
# Robot
max_vel_x: 2.2
max_vel_x_backwards: 0.8
max_vel_theta: 6.28
acc_lim_x: 5.0
acc_lim_theta: 12.56
min_turning_radius: 0.8
footprint_model: # types: "point", "circular", "two_circles", "line", "polygon"
type: "two_circles"
front_offset: 0.5 # for type "two_circles"
front_radius: 1.2 # for type "two_circles"
rear_offset: -0.2 # for type "two_circles"
rear_radius: 0.5 # for type "two_circles"
#vertices: [ [0.25, -0.05], [0.18, -0.05], [0.18, -0.18], [-0.19, -0.18], [-0.25, 0], [-0.19, 0.18], [0.18, 0.18], [0.18, 0.05], [0.25, 0.05] ] # for type "polygon"
# GoalTolerance
xy_goal_tolerance: 1.0
yaw_goal_tolerance: 1.0
free_goal_vel: False
# Obstacles
min_obstacle_dist: 0.4
include_costmap_obstacles: False
costmap_obstacles_behind_robot_dist: 1.0
obstacle_poses_affected: 1
costmap_converter_plugin: ""
costmap_converter_spin_thread: True
costmap_converter_rate: 5
# Optimization
no_inner_iterations: 1
no_outer_iterations: 1
optimization_activate: True
optimization_verbose: False
penalty_epsilon: 0.1
weight_max_vel_x: 2
weight_max_vel_theta: 1
weight_acc_lim_x: 1
weight_acc_lim_theta: 1
weight_kinematics_nh: 1000
weight_kinematics_forward_drive: 10
weight_kinematics_turning_radius: 1
weight_optimaltime: 1
weight_obstacle: 50
weight_dynamic_obstacle: 10 # not in use yet
selection_alternative_time_cost: False # not in use yet
# Homotopy Class Planner
enable_homotopy_class_planning: False
enable_multithreading: False
simple_exploration: False
max_number_classes: 4
roadmap_graph_no_samples: 15
roadmap_graph_area_width: 5
h_signature_prescaler: 0.5
h_signature_threshold: 0.1
obstacle_keypoint_offset: 0.1
obstacle_heading_threshold: 0.45
visualize_hc_graph: False
Here is an image link of the top (sorry i don't have enough points to upload an image) - https://ibb.co/g980BVv
any ideas of what could be causing it to stall completely? thank you in advance !
Hey! We have the same problems with our Jetson :( I hope we can figure something out soon
Best wishes ~gzy
I'm experiencing a very similar problem. Did you figure this out? I found that
cmd_vel
msgs are published once every 20 seconds, and not at the specified rate.Here are a couple of things that helped me - I reduced the size of my local costmap by half, and increased the resolution. I removed all obstacles near the robot, and I also reduced my
dt_ref
. It still stalls out from time to time, (Especially when I have big obstacles in scene) but I'm able to plan and go to different goals now.The computation should not be that big of a problem. I am using teb with TX2 and we are running around 20hz (a bit lower than that). My guess is since you did not choose a costmap converter plugin, I think teb would take the local costmap and use every point as a point obstacle. Then the obstacle cost would increase the computation as the matrix for optimization is no longer sparse. Another guess would be your local costmap size and global costmap size. I am using around 3 m square for local costmap and it seems to be fine.
Hi, I modified the parameter text according to your advice and enabled Costmap Converter , but it doesn't seem to work.I still can't update global planning, and the TEB planner doesn't respond and can't output a CMD_ Vel. please check my text. I think there are still many people who don't know how to modify the details. Thank you very much for your generous help!
# Obstacles min_obstacle_dist: 0.35 # This value must also include our robot's expansion, since footprint_model is set to "line". inflation_dist: 0.8 include_costmap_obstacles: True costmap_obstacles_behind_robot_dist: 1.0 obstacle_poses_affected: 5
dynamic_obstacle_inflation_dist: 0.6 include_dynamic_obstacles: True
costmap_converter_plugin: "costmap_converter::CostmapToPolygonsDBSConcaveHull" costmap_converter_spin_thread: True costmap_converter_rate: 5
# Optimization
no_inner_iterations: 3 no_outer_iterations: 2 optimization_activate: True optimization_verbose: False penalty_epsilon: 0.1
I'm not sure if I can pin down the problem exactly, so I'm gonna throw some guesses. 1. Can the default yaml file run properly? If so, the problem is probably not computation. 2. I have seen in some cases setting the dt_ref and dt_hysteresis to be 1/10 of one another causes some problem (poses too sparse it seems to me). 3. Also not sure if that is also paired with the max acceleration. For example, the max acceleration is 4pi, since the dt_ref is 0.9s, the robot might want a 3.6pi angular velocity. The maximum angular velocity is 2pi, and thus infeasible. 4. Did you set move_base output="screen"? Did it output anything? I am just wondering if it is feasible. I understand that you are able to run teb properly on the pc, just not xavier, I just want to make sure we ...(more)