Motion Planning¶
Motion planning for one entity of a built env: a planner takes a goal in its backend's form (joint space or task
space) and returns joint-space waypoints. A planner is a MotionPlannerBase subclass registered in
MOTION_PLANNER_REGISTRY and configured by PlannerOptions; two backends ship, cuRobo and OMPL. Each imports
its library lazily and reports whether it is installed (IS_CUROBO_AVAILABLE, IS_OMPL_AVAILABLE). The
planning and sysid guide shows them in use.
from eden.extensions.motion_planning.base import MOTION_PLANNER_REGISTRY, MotionPlannerBase
from eden.options.extensions.motion_planning import PlannerOptions
Base class and registry¶
Base class for motion planners.
Attributes¶
Classes¶
MotionPlannerBase
¶
MotionPlannerBase(env: EnvBase, options: PlannerOptions)
Bases: ConfigurableMixin[PlannerOptions]
Abstract base class for motion planners.
Subclasses provide backend-specific goal representations (joint-space, task-space, etc.)
and return planned waypoints in joint space. The shared option entity_name names the
entity to plan motions for (resolved at construction).
| PARAMETER | DESCRIPTION |
|---|---|
env
|
The environment instance.
TYPE:
|
options
|
From the backend's
TYPE:
|
Source code in eden/extensions/motion_planning/base.py
Attributes¶
Methods:¶
plan_motion
abstractmethod
¶
Plan motion to a target configuration.
Subclasses define their own goal specification (joint-space, task-space, etc.) via keyword arguments.
| RETURNS | DESCRIPTION |
|---|---|
list[Tensor]
|
Planned waypoints in joint space. The layout is backend-specific: one
|
Source code in eden/extensions/motion_planning/base.py
Functions:¶
Options¶
Configuration options for motion-planning extensions.
Classes¶
PlannerOptions
¶
Bases: DynamicConfigurableOptions
Options for motion planning extensions.
| PARAMETER | DESCRIPTION |
|---|---|
entity_name
|
The name of the entity to plan motions for
|
Source code in eden/options/options.py
cuRobo¶
cuRobo-based motion planner.
Attributes¶
Classes¶
CuroboPlanner
¶
CuroboPlanner(env: EnvBase, options: PlannerOptions)
Bases: MotionPlannerBase
Motion planner using cuRobo for collision-aware trajectory generation.
Options (besides the shared entity_name):
robot_config_file(str): path to the robot configuration YAML file (cuRobo format).ee_link_name(str): the end-effector link.collision_entities_name(list[str] | None): entities whose geoms are collision obstacles.interpolation_dt(float): time step, in seconds, between interpolated waypoints.
| PARAMETER | DESCRIPTION |
|---|---|
env
|
The environment instance.
TYPE:
|
options
|
From
TYPE:
|
Source code in eden/extensions/motion_planning/curobo/planner.py
Attributes¶
collision_entities_name
class-attribute
instance-attribute
¶
Methods:¶
update_world
¶
update_world(carried_entities: list[Entity] | None = None, num_envs: int = 1, envs_idx: int | slice | Tensor | None = None) -> None
Rebuild the collision world and motion generator.
Call this before plan_motion when the scene has changed.
Source code in eden/extensions/motion_planning/curobo/planner.py
plan_motion
¶
plan_motion(ee_goal_pos: Tensor, ee_goal_quat: Tensor, qpos_start: Tensor | None = None, envs_idx: int | slice | Tensor | None = None) -> list[Tensor]
Plan a collision-free motion to the target end-effector pose.
| PARAMETER | DESCRIPTION |
|---|---|
ee_goal_pos
|
Target end-effector position in the world frame, shape (num_envs, 3).
TYPE:
|
ee_goal_quat
|
Target end-effector quaternion (wxyz) in the world frame, shape (num_envs, 4).
TYPE:
|
qpos_start
|
Start joint configuration. Defaults to current entity qpos.
TYPE:
|
envs_idx
|
Environment indices to plan for. Defaults to every environment. |
| RETURNS | DESCRIPTION |
|---|---|
list[Tensor]
|
Planned waypoints for each environment, each of shape (num_waypoints, n_dof). An
environment whose plan failed gets its start configuration as a single waypoint, and
every environment gets an empty |
Source code in eden/extensions/motion_planning/curobo/planner.py
OMPL¶
OMPL-based motion planner.
Attributes¶
OMPL_BOOST_PYTHON
module-attribute
¶
OMPL_BOOST_PYTHON = IS_OMPL_AVAILABLE and hasattr(ob, 'StateValidityCheckerFn')
Classes¶
OMPLPlanner
¶
OMPLPlanner(env: EnvBase, options: PlannerOptions)
Bases: MotionPlannerBase
Motion planner backed by OMPL.
Plans in the entity's full qpos space for one environment at a time, checking collisions
by setting the entity's qpos in the scene.
| PARAMETER | DESCRIPTION |
|---|---|
env
|
The environment instance.
TYPE:
|
options
|
From
TYPE:
|
Source code in eden/extensions/motion_planning/ompl/planner.py
Methods:¶
plan_motion
¶
plan_motion(qpos_goal: Tensor, qpos_start: Tensor | None = None, resolution: float = 0.01, timeout: float = 5.0, max_retry: int = 1, smooth_path: bool = True, num_waypoints: int = 100, ignore_collision: bool = False, planner: str = 'RRTConnect', envs_idx: int = 0) -> list[Tensor]
Plan a collision-free joint-space path from the start to the goal configuration.
A start or goal outside the joint limits widens the planning bounds to contain it (with a
warning), and collision pairs already active in the scene when it is called are ignored
throughout. The entity's qpos is set to qpos_start before returning.
| PARAMETER | DESCRIPTION |
|---|---|
qpos_goal
|
The goal configuration of the entity, shape
TYPE:
|
qpos_start
|
The start configuration, shape
TYPE:
|
resolution
|
State-validity checking resolution along a motion, as OMPL's
TYPE:
|
timeout
|
Time budget of one solve attempt, in seconds.
TYPE:
|
max_retry
|
The maximum number of solve attempts while the planner times out or finds only an approximate solution.
TYPE:
|
smooth_path
|
Whether to shortcut and B-spline-smooth the path.
TYPE:
|
num_waypoints
|
The number of waypoints the path is interpolated to.
TYPE:
|
ignore_collision
|
Whether to skip collision checking.
TYPE:
|
planner
|
The name of an
TYPE:
|
envs_idx
|
The environment index. This planner does not support batch processing.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
waypoints
|
One
TYPE:
|
Source code in eden/extensions/motion_planning/ompl/planner.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | |