Usage Tutorial
Configuring Costmaps
Configuring of costmaps is pretty similar to the navigation stack. CoHAN offers two extra layers (Human Static and Visible) that adds more safety and legibility to the robot’s plan. Here is how you add them to the costmap (either local or global):
global_costmap:
global_costmap:
ros__parameters:
plugins: ["human_static_layer", "human_visibility_layer"]
human_static_layer:
plugin: "cohan_layers::StaticAgentLayer"
agent_radius: 0.30
amplitude: 150.0
human_visibility_layer:
plugin: "cohan_layers::AgentVisibilityLayer"
agent_radius: 0.30
amplitude: 250.0
Please edit the robot_radius and agent_radius appropriately. Example config file can be found in nav2_params.yaml.
Configuring HATEBLocalPlanner
For HATEB_Local_Planner, there are several parameters. Here we show some important ones:
## Planning Mode
planning_mode: 1 #(0: robot navigation wuth no human planning. 1: human-aware planning)
## Robot Params (there are several others as well to set robot model completely -> check example files)
robot:
max_vel_x: 0.7
max_vel_x_backwards: 0.4
max_vel_theta: 1.2
min_vel_theta: 0.1
acc_lim_x: 0.3
acc_lim_theta: 0.4
# Agents (humans) and HATEB
## Agent Model Params
agent:
agent_radius: 0.30
max_agent_vel_x: 1.3
max_agent_vel_y: 0.4
max_agent_vel_x_backwards: 0.01
max_agent_vel_theta: 1.1
agent_acc_lim_x: 0.6
agent_acc_lim_y: 0.3
agent_acc_lim_theta: 0.8
## HATEB Params (activate all constraints and set thresholds (these are defaults for a good performance))
hateb:
use_agent_agent_safety_c: True
use_agent_robot_safety_c: True
use_agent_robot_rel_vel_c: True
use_agent_robot_visi_c: True
add_invisible_humans: True
min_agent_agent_dist: 0.4
min_agent_robot_dist: 0.8
rel_vel_cost_threshold: 1.5
visibility_cost_threshold: 2.5
invisible_human_threshold: 1.0
prediction_time_horizon: 10.0
# Optimization weights (Since it is based on teb, there are lot more parameters -> check example files and teb_local_planner)
optim:
weight_agent_robot_safety: 5.0
weight_agent_agent_safety: 2.0
weight_agent_robot_rel_vel: 5.0
weight_agent_robot_visibility: 5.0
weight_invisible_human: 1.0
weight_kinematics_nh: 1000. ## 0 for Omni, 1000 for diff
weight_kinematics_forward_drive: 50.
Look at nav2_params.yaml for full example configuration.
Required Topics
We assume that the robot has good tf and well localized in the environment (map). The following topics are required for the system to work properly:
/tracked_agents
/odom
/base_scan (laser scan topic for obstacle layer)
/joint_states (optional for simulation)
The /tracked_agents topic uses a custom message TrackedAgents. Other topics are standard ROS topics. An example script publishing tracked_agents topic can be found in agents_bridge.py.