smac lattice planner for differential robot
env: ros2 humble on ubuntu 22.04
I am trying to use smac lattice planner for my differential/rectangular robot. I noticed that when the robot arrives near goal, it parks as a vehicle and it does not rotate on goal. in nav2 documentation it says that the planner is suitable for differential non-circular robot. How can I make the robot rotate on goal ? here is the screen and config:
planner_server:
ros__parameters:
expected_planner_frequency: 20.0
use_sim_time: False
planner_plugins: ["GridBased"]
GridBased:
plugin: "nav2_smac_planner/SmacPlannerLattice"
allow_unknown: true
tolerance: 0.05
max_iterations: 1000000
max_on_approach_iterations: 1000
max_planning_time: 5.0
analytic_expansion_ratio: 3.5
analytic_expansion_max_length: 4.0
reverse_penalty: 1.0
change_penalty: 0.05
non_straight_penalty: 1.05
cost_penalty: 2.0
rotation_penalty: 1.0
retrospective_penalty: 0.015
lattice_filepath: "path_to_file/output.json"
lookup_table_size: 20.0
cache_obstacle_heuristic: true
allow_reverse_expansion: true
smooth_path: False
and for the primitive config:
{
"motion_model": "diff",
"turning_radius": 1.0,
"grid_resolution": 0.05,
"stopping_threshold": 5,
"num_of_headings": 16
}
You don't seem to be distinguishing between a Planner and a Controller. Do you think the problem is that the Planner is not generating the pose you want, or that the Controller is not executing it?
the controller is following the exact path (as expected), but the generated path from the planner is not suitable for differential robot since differential robots can rotate in place, but if you see the screenshot, the robot will park as a vehicle to meet the requested orientation.