Global Planner¶
Global path planning and trajectory generation.
The Planner component is responsible for finding an optimal or suboptimal path from a start to a goal location using complete map information (i.e. the global or reference map).
It leverages the Open Motion Planning Library (OMPL) backend to support various sampling-based algorithms (RRT*, PRM, etc.), capable of handling complex kinematic constraints. Collision checking is handled by the FCL (Flexible Collision Library) for precise geometric collision detection.
Available Run Types¶
Planner can be used with all four available Run Types:
Timed |
Periodic Re-planning. Compute a new plan periodically (e.g., at 1Hz) from the robot’s current location to the last received goal. |
Event |
Reactive Planning. Trigger a new plan computation only when a new message is received on the |
Service |
Request/Response. Offers a standard ROS2 Service ( |
Action Server |
Long-Running Goal. Offers a standard ROS2 Action. continuously computes and updates the plan until the goal is reached or canceled. |
Inputs¶
Key Name |
Allowed Types |
Number |
Default |
|---|---|---|---|
map |
1 |
|
|
goal_point |
|
1 |
|
location |
|
1 |
|
Note
goal_point input is only used if the Planner is running as TIMED or EVENT Component. In the other two types, the goal point is provided in the service request or the action goal.
Tip
Detections, Points-of-Interest, and Trackings as goals. The Planner accepts Detections, PointsOfInterest, and Trackings messages from EmbodiedAgents directly on the goal_point input. These carry pixel-space coordinates from ML models; when paired with an RGBD source, the depth channel is used to project pixel coordinates to averaged world-space coordinates via camera intrinsics, so a Vision component can drive the Planner without an intermediate Pose topic. See Cortex with Navigation and Multimodal Planning for the patterns.
Outputs¶
Key Name |
Allowed Types |
Number |
Default |
|---|---|---|---|
plan |
1 |
|
|
reached_end |
|
1 |
|
OMPL Algorithms¶
EMOS integrates over 25 OMPL geometric planners. See the Planning Algorithms (OMPL) section of the Algorithms Reference for a complete list with benchmarks and per-planner configuration parameters.
Collision Checking (FCL)¶
FCL is a generic library for performing proximity and collision queries on geometric models. EMOS leverages FCL to perform precise collision checks between the robot’s kinematic model and both static (map) and dynamic (sensor) obstacles during path planning and control.
Usage Example¶
from kompass.components import Planner, PlannerConfig
from kompass.config import ComponentRunType
from kompass.ros import Topic
from kompass_core.models import RobotType, RobotConfig, RobotGeometry, LinearCtrlLimits, AngularCtrlLimits
import numpy as np
# Configure your robot
my_robot = RobotConfig(
model_type=RobotType.DIFFERENTIAL_DRIVE,
geometry_type=RobotGeometry.Type.CYLINDER,
geometry_params=np.array([0.1, 0.3]),
ctrl_vx_limits=LinearCtrlLimits(max_vel=1.0, max_acc=1.5, max_decel=2.5),
ctrl_omega_limits=AngularCtrlLimits(
max_vel=1.0, max_acc=2.0, max_decel=2.0, max_steer=np.pi / 3
),
)
# Setup the planner config
config = PlannerConfig(
robot=my_robot,
loop_rate=1.0 # 1Hz
)
planner = Planner(component_name="planner", config=config)
planner.run_type = ComponentRunType.EVENT # Can also pass a string "Event"
# Add rviz clicked_point as input topic
goal_topic = Topic(name="/clicked_point", msg_type="PoseStamped")
planner.inputs(goal_point=goal_topic)