A local planner helps a robot decide how to move safely and smoothly in its nearby space. It plans short paths to avoid obstacles and reach the goal.
Local planner (DWA, TEB) in ROS
local_planner: type: dwa_local_planner/DWAPlannerROS max_vel_x: 0.5 min_vel_x: 0.1 max_rot_vel: 1.0 acc_lim_x: 2.5 acc_lim_theta: 3.2 # or for TEB planner local_planner: type: teb_local_planner/TEBLocalPlannerROS max_vel_x: 0.6 max_vel_x_backwards: 0.3 max_vel_theta: 1.0 acc_lim_x: 3.0 acc_lim_theta: 3.2
The type field selects which planner to use: DWA or TEB.
Parameters like max_vel_x control the robot's speed limits.
local_planner: type: dwa_local_planner/DWAPlannerROS max_vel_x: 0.5 min_vel_x: 0.1 max_rot_vel: 1.0
local_planner: type: teb_local_planner/TEBLocalPlannerROS max_vel_x: 0.6 max_vel_x_backwards: 0.3 max_vel_theta: 1.0
This launch file starts the move_base node with the DWA local planner configured for safe robot movement.
# ROS launch snippet to use DWA local planner <launch> <node pkg="move_base" type="move_base" name="move_base" output="screen"> <param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" /> <param name="DWAPlannerROS/max_vel_x" value="0.5" /> <param name="DWAPlannerROS/min_vel_x" value="0.1" /> <param name="DWAPlannerROS/max_rot_vel" value="1.0" /> </node> </launch>
DWA (Dynamic Window Approach) focuses on velocity sampling for safe motion.
TEB (Timed Elastic Band) optimizes the path considering time and robot dynamics.
Both planners require tuning parameters to match your robot's capabilities.
Local planners help robots move safely in their immediate surroundings.
DWA and TEB are popular local planners in ROS for obstacle avoidance and smooth navigation.
Choosing and tuning the right planner depends on your robot and environment.
Practice
Solution
Step 1: Understand the role of local planners
Local planners focus on immediate surroundings to avoid obstacles and plan short paths.Step 2: Compare options
Mapping the environment is done by global planners or mapping nodes, not local planners.Final Answer:
To help the robot navigate safely around obstacles nearby -> Option CQuick Check:
Local planner = safe nearby navigation [OK]
- Confusing local planner with global planner
- Thinking local planner maps environment
- Assuming local planner manages robot hardware
Solution
Step 1: Identify the correct parameter name for local planner
The parameter to specify the local planner plugin is usually 'base_local_planner'.Step 2: Match the correct plugin name for DWA
DWA local planner plugin is 'dwa_local_planner/DWAPlannerROS'. base_local_planner: "dwa_local_planner/DWAPlannerROS" matches this exactly.Final Answer:
base_local_planner: "dwa_local_planner/DWAPlannerROS" -> Option AQuick Check:
Correct plugin name and parameter = base_local_planner: "dwa_local_planner/DWAPlannerROS" [OK]
- Using 'planner' instead of 'base_local_planner'
- Confusing DWA and TEB plugin names
- Using global planner plugin name for local planner
teb_local_planner: max_vel_x: 0.5 max_vel_theta: 1.0 min_turning_radius: 0.2What will happen if the robot tries to turn with an angular velocity of 1.5 rad/s?
Solution
Step 1: Understand max_vel_theta parameter
This parameter sets the maximum allowed angular velocity for the robot.Step 2: Compare requested angular velocity with max_vel_theta
The requested 1.5 rad/s exceeds the max of 1.0 rad/s, so the planner limits it to 1.0 rad/s.Final Answer:
The planner will limit the angular velocity to 1.0 rad/s -> Option BQuick Check:
Angular velocity capped by max_vel_theta = The planner will limit the angular velocity to 1.0 rad/s [OK]
- Assuming planner allows velocities above max
- Thinking planner stops robot on limit breach
- Ignoring max_vel_theta parameter
Solution
Step 1: Identify parameters affecting obstacle avoidance
DWA uses parameters like obstacle distance to decide when to start avoiding obstacles.Step 2: Analyze effect of low obstacle distance
If set too low, the planner reacts too late, causing collisions.Final Answer:
The obstacle distance parameter is set too low, causing late avoidance -> Option AQuick Check:
Late avoidance due to low obstacle distance = The obstacle distance parameter is set too low, causing late avoidance [OK]
- Blaming global planner for local planner issues
- Ignoring parameter tuning for obstacle avoidance
- Assuming hardware issues cause collisions without evidence
Solution
Step 1: Understand min_turning_radius effect
Decreasing min_turning_radius allows tighter turns, useful in narrow corridors.Step 2: Understand obstacle_avoidance_force effect
Increasing obstacle_avoidance_force makes the planner keep safer distance from obstacles, improving clearance.Step 3: Combine effects for smooth navigation
Tight turns plus stronger obstacle avoidance helps smooth, safe navigation in tight spaces.Final Answer:
Decrease min_turning_radius and increase obstacle_avoidance_force -> Option DQuick Check:
Tight turns + strong avoidance = Decrease min_turning_radius and increase obstacle_avoidance_force [OK]
- Increasing turning radius makes turns wider, not tighter
- Disabling obstacle avoidance causes collisions
- Confusing velocity limits with turning parameters
Ready to prove it?
Pass the test and this pattern moves unknown
