Python API reference#
This reference is generated from the installed library package and its public docstrings.
- class isaacsim.robot_motion.cumotion.CumotionDebugVisualizer(*args, **kwargs)#
Bases:
ProtocolInterface used by the cuMotion world to visualize collision geometry.
- create_capsule(
- source_prim_path: str,
- geometry_index: int,
- radius: float,
- height: float,
- enabled: bool,
Create a capsule debug prim and return its path.
- Parameters:
source_prim_path – Path of the source geometry prim.
geometry_index – Index of the geometry on the source prim.
radius – Geometry radius.
height – Geometry height.
enabled – Whether the feature is enabled.
- Returns:
Path to the created capsule prim.
- create_cube(
- source_prim_path: str,
- geometry_index: int,
- side_lengths: ndarray,
- enabled: bool,
Create a cube debug prim and return its path.
- Parameters:
source_prim_path – Path of the source geometry prim.
geometry_index – Index of the geometry on the source prim.
side_lengths – Cube side lengths.
enabled – Whether the feature is enabled.
- Returns:
Path to the created cube prim.
- create_sphere(
- source_prim_path: str,
- geometry_index: int,
- radius: float,
- enabled: bool,
Create a sphere debug prim and return its path.
- Parameters:
source_prim_path – Path of the source geometry prim.
geometry_index – Index of the geometry on the source prim.
radius – Geometry radius.
enabled – Whether the feature is enabled.
- Returns:
Path to the created sphere prim.
- set_enabled(path: str, enabled: bool) None#
Update the visual state of a debug prim.
- Parameters:
path – Filesystem path to process.
enabled – Whether the feature is enabled.
- update_poses(
- paths: list[str],
- positions: ndarray,
- orientations: ndarray,
Update world poses for debug prims.
- Parameters:
paths – Paths values.
positions – Positions values.
orientations – Orientations values.
- class isaacsim.robot_motion.cumotion.CumotionRobot(
- directory: Path,
- robot_description: RobotDescription,
- kinematics: Kinematics,
- controlled_joint_names: list[str],
Bases:
objectRobot for cuMotion planning and control.
This dataclass encapsulates all the necessary data for a robot to be used with cuMotion, including the robot description, kinematics solver, and controlled joint names.
- Parameters:
directory – Path to the robot configuration directory containing URDF/XRDF files.
robot_description – cuMotion robot description loaded from URDF/XRDF files.
kinematics – cuMotion kinematics solver for the robot.
controlled_joint_names – List of joint names that are controlled by the planner.
- controlled_joint_names: list[str]#
- directory: Path#
- kinematics: Kinematics#
- robot_description: RobotDescription#
- class isaacsim.robot_motion.cumotion.CumotionTrajectory(
- trajectory: Trajectory,
- robot_joint_space: list[str],
- cumotion_robot: CumotionRobot,
- device: Device | None = None,
Bases:
TrajectoryContinuous-time trajectory for a robot using cuMotion.
This class wraps a cuMotion trajectory and provides the Isaac Sim trajectory interface for querying robot states at specific times. All trajectories start at time 0.0 and end after their duration.
- Parameters:
trajectory – cuMotion trajectory object.
robot_joint_space – List of robot joint names in the joint space.
cumotion_robot – Robot configuration containing joint names and descriptions.
device – Warp device for computation. Defaults to None.
- Raises:
ValueError – If cuMotion active joints are not a subset of the robot_joint_space.
Example
trajectory = CumotionTrajectory( trajectory=cumotion_traj, robot_joint_space=joint_names, cumotion_robot=robot_config ) state = trajectory.get_target_state(time=1.0)
- get_active_joints() list[str]#
Get the list of controlled joint names.
- Returns:
List of joint names that are controlled in this trajectory.
- get_target_state(
- time: float,
Get the target robot state at a specified time.
Returns joint positions and velocities for the robot at the given time along the trajectory. If the time is outside the trajectory domain, None is returned.
- Parameters:
time – Time in trajectory at which to return joint targets.
- Returns:
Robot state containing joint positions and velocities, or None if time is outside the trajectory domain.
Example:
state = trajectory.get_target_state(time=2.5) if state is not None: print(state.joints.positions)
- property duration: float#
Get the duration of the trajectory.
- Returns:
Duration of the trajectory in seconds.
- class isaacsim.robot_motion.cumotion.CumotionWorldInterface(
- world_to_robot_base: tuple[array, array] | None = None,
- debug_visualizer: CumotionDebugVisualizer | None = None,
- device: Device | str | None = None,
Bases:
WorldInterfaceWorld interface for cuMotion collision checking and planning.
This class provides the bridge between Isaac Sim’s USD scene representation and cuMotion’s collision world. It manages obstacle registration, updates, and coordinate frame transformations between Isaac Sim (world frame) and cuMotion (robot base frame).
- Parameters:
world_to_robot_base – Transform from world frame to robot base frame. Defaults to None (identity transform). This is a tuple of position and quaternion, where the quaternion is in the form (w, x, y, z).
debug_visualizer – Optional visualizer used to display collision geometry.
device – Device used by the interface for internally-allocated warp arrays and for the per-frame collider transform composition. Accepts the same values as
wp.get_device()(None,"cpu","cuda","cuda:0", or awp.Device);Noneresolves to warp’s current default device. CPU devices run the transform composition in vectorized NumPy on the host; CUDA devices run the Warp kernel path on the GPU.
Example
world_interface = CumotionWorldInterface()
- add_capsules(
- prim_paths: list[str],
- axes: list[Literal['X', 'Y', 'Z']],
- radii: array,
- lengths: array,
- scales: array,
- safety_tolerances: array,
- poses: tuple[array, array],
- enabled_array: array,
Add capsule collision obstacles to the cuMotion world.
- Parameters:
prim_paths – USD prim paths for each capsule.
axes – Capsule axis for each capsule.
radii – Capsule radii.
lengths – Capsule lengths.
scales – Local scale factors for each capsule.
safety_tolerances – Safety margin around each capsule.
poses – Tuple of (positions, orientations) arrays.
enabled_array – Collision enabled state for each capsule.
- add_cubes(
- prim_paths: list[str],
- sizes: array,
- scales: array,
- safety_tolerances: array,
- poses: tuple[array, array],
- enabled_array: array,
Add cuboid collision obstacles to the cuMotion world.
- Parameters:
prim_paths – USD prim paths for each cube.
sizes – Cube side lengths.
scales – Local scale factors for each cube.
safety_tolerances – Safety margin around each cube.
poses – Tuple of (positions, orientations) arrays.
enabled_array – Collision enabled state for each cube.
- add_oriented_bounding_boxes(
- prim_paths: list[str],
- centers: array,
- rotations: array,
- half_side_lengths: array,
- scales: array,
- safety_tolerances: array,
- poses: tuple[array, array],
- enabled_array: array,
Add oriented bounding box collision obstacles to the cuMotion world as cuboids.
- Parameters:
prim_paths – USD prim paths for each oriented bounding box.
centers – OBB centers relative to the object frame.
rotations – OBB rotation quaternions relative to the object frame.
half_side_lengths – Half side lengths of each OBB.
scales – Local scale factors for each OBB.
safety_tolerances – Safety margin around each OBB.
poses – Tuple of (positions, orientations) arrays.
enabled_array – Collision enabled state for each OBB.
- add_planes(
- prim_paths: list[str],
- axes: list[Literal['X', 'Y', 'Z']],
- lengths: array,
- widths: array,
- scales: array,
- safety_tolerances: array,
- poses: tuple[array, array],
- enabled_array: array,
Add plane collision obstacles to the cuMotion world as thin cuboids.
- Parameters:
prim_paths – USD prim paths for each plane.
axes – Plane normal axis for each plane.
lengths – Plane lengths.
widths – Plane widths.
scales – Local scale factors for each plane.
safety_tolerances – Safety margin around each plane.
poses – Tuple of (positions, orientations) arrays.
enabled_array – Collision enabled state for each plane.
- add_spheres(
- prim_paths: list[str],
- radii: array,
- scales: array,
- safety_tolerances: array,
- poses: tuple[array, array],
- enabled_array: array,
Add sphere collision obstacles to the cuMotion world.
- Parameters:
prim_paths – USD prim paths for each sphere.
radii – Sphere radii.
scales – Local scale factors for each sphere.
safety_tolerances – Safety margin around each sphere.
poses – Tuple of (positions, orientations) arrays.
enabled_array – Collision enabled state for each sphere.
- add_triangulated_meshes(
- prim_paths: list[str],
- points: list[array],
- face_vertex_indices: list[array],
- scales: array,
- safety_tolerances: array,
- poses: tuple[array, array],
- enabled_array: array,
Add triangulated mesh collision obstacles to the cuMotion world using sphere decomposition.
- Parameters:
prim_paths – USD prim paths for each mesh.
points – List of vertex position arrays for each mesh.
face_vertex_indices – List of triangle index arrays for each mesh.
scales – Local scale factors for each mesh.
safety_tolerances – Safety margin around each mesh.
poses – Tuple of (positions, orientations) arrays.
enabled_array – Collision enabled state for each mesh.
- get_world_to_robot_base_transform() tuple[array, array]#
Get the transform from world frame to robot base frame.
Returns the current transform that maps coordinates from the Isaac Sim world frame to the cuMotion robot base frame. The result is memoized: the same
wp.arrayobjects are returned on every call until the base-frame pose is updated viaupdate_world_to_robot_root_transforms.- Returns:
Tuple of (position, quaternion) as warp arrays where position has shape (3,) and quaternion has shape (4,) in (w, x, y, z) format.
- update_obstacle_enables(
- prim_paths: list[str],
- enabled_array: array,
Update the enabled/disabled state of tracked obstacles.
Enables or disables collision checking for obstacles that have already been added to the world. Disabled obstacles are ignored during collision checking.
- Parameters:
prim_paths – List of prim paths identifying the obstacles to update.
enabled_array – Warp array of boolean values indicating enabled state, shape (N,) where N is the number of prim paths.
- Raises:
RuntimeError – If any prim paths are not currently tracked.
ValueError – If input arrays have mismatched lengths or are empty.
- update_obstacle_transforms(
- prim_paths: list[str],
- poses: tuple[array, array],
Update the world-to-object transforms for tracked obstacles.
Updates the poses of obstacles that have already been added to the world.
- Parameters:
prim_paths – List of prim paths identifying the obstacles to update.
poses – Tuple of (positions, quaternions) where positions has shape (N, 3) and quaternions has shape (N, 4) in (w, x, y, z) format.
- Raises:
RuntimeError – If any prim paths are not currently tracked.
ValueError – If input arrays have mismatched lengths or are empty.
- update_world_to_robot_root_transforms(
- poses: tuple[array, array],
Update the transform from world frame to robot base frame.
cuMotion plans relative to the robot base frame. This method updates the base frame pose and recomputes all collider transforms in the base frame.
- Parameters:
poses – Tuple of (positions, quaternions) where positions has shape (1, 3) and quaternions has shape (1, 4) in (w, x, y, z) format.
- Raises:
ValueError – If the number of transforms is not exactly 1.
ValueError – If positions don’t have 3 elements.
ValueError – If quaternions don’t have 4 elements.
- property world_view: cumotion.WorldView#
Get the world_view associated with the cumotion.World object.
- class isaacsim.robot_motion.cumotion.GraphBasedMotionPlanner(
- cumotion_robot: CumotionRobot,
- cumotion_world_interface: CumotionWorldInterface,
- tool_frame: str | None = None,
- graph_planner_config_filename: Path | str | None = None,
Bases:
objectGraph-based motion planner using cuMotion for collision-free path planning.
This planner uses sampling-based algorithms (RRT variants) to find collision-free paths for robotic manipulators. It supports planning to configuration space targets, task space pose targets, and translation-only targets.
- Parameters:
cumotion_robot – Robot configuration containing the robot description (URDF/XRDF) and configuration directory.
cumotion_world_interface – World interface providing collision geometry and world view.
tool_frame – Name of the tool frame to use for task space planning. Defaults to None, which uses the first tool frame defined in the robot description.
graph_planner_config_filename – Path to a YAML configuration file for the planner parameters. If a relative path is provided, it is resolved relative to cumotion_robot.directory. If an absolute path is provided, it is used as-is. Defaults to None, which uses default planner parameters.
Example
from isaacsim.robot_motion.cumotion import ( CumotionRobot, CumotionWorldInterface, GraphBasedMotionPlanner, ) robot_config = CumotionRobot(franka_directory) world_interface = CumotionWorldInterface(robot_config) planner = GraphBasedMotionPlanner(robot_config, world_interface) # Plan to a joint configuration target path = planner.plan_to_cspace_target(q_initial, q_target)
- get_cumotion_robot() CumotionRobot#
Get the robot configuration.
- Returns:
The robot configuration used by this planner.
- get_graph_planner_config() MotionPlannerConfig#
Get the motion planner configuration.
Returns the underlying cuMotion configuration object, allowing users to modify planner parameters before planning.
- Returns:
The cuMotion motion planner configuration object.
Example
config = planner.get_graph_planner_config() config.set_param("max_iterations", cumotion.MotionPlannerConfig.ParamValue(1000))
- plan_to_cspace_target(
- q_initial: array | ndarray | list[float],
- q_final: array | ndarray | list[float],
Plan a collision-free path to a target joint configuration.
Uses graph-based planning (RRT) to find a collision-free path from the initial joint configuration to the target joint configuration in configuration space.
- Parameters:
q_initial – Initial joint configuration.
q_final – Target joint configuration.
- Returns:
Path object if a path was found, None otherwise.
Example
q_initial = [0.0, -0.5, 0.0, -2.0, 0.0, 1.5, 0.75] q_target = [1.0, -0.3, 0.2, -1.8, 0.1, 1.2, 0.5] path = planner.plan_to_cspace_target(q_initial, q_target) if path is not None: trajectory = path.to_minimal_time_joint_trajectory()
- plan_to_pose_target(
- q_initial: array | ndarray | list[float],
- position: array | ndarray | list[float],
- orientation: array | ndarray | list[float],
Plan a collision-free path to a target pose (position + orientation) defined relative to the world frame.
Uses JtRRT (Jacobian-transpose RRT) to find a collision-free path from the initial joint configuration to a task space pose target. The orientation is fully constrained.
- Parameters:
q_initial – Initial joint configuration.
position – Target position as [x, y, z] relative to world origin.
orientation – Target orientation as quaternion [w, x, y, z] or 3x3 rotation matrix relative to world frame.
- Returns:
Path object if a path was found, None otherwise.
- Raises:
ValueError – If orientation is not a valid quaternion (4 elements) or 3x3 rotation matrix.
Example
q_initial = [0.0, -0.5, 0.0, -2.0, 0.0, 1.5, 0.75] position = [0.5, 0.2, 0.4] orientation = [1.0, 0.0, 0.0, 0.0] # wxyz quaternion (identity) path = planner.plan_to_pose_target(q_initial, position, orientation)
- plan_to_translation_target(
- q_initial: array | ndarray | list[float],
- translation_target: array | ndarray | list[float],
Plan a collision-free path to a target position (translation only) defined relative to the world frame.
Uses JtRRT (Jacobian-transpose RRT) to find a collision-free path from the initial joint configuration to a task space translation target. The end-effector orientation is unconstrained, allowing the planner more flexibility in finding a valid path.
- Parameters:
q_initial – Initial joint configuration.
translation_target – Target position as [x, y, z] relative to world frame origin.
- Returns:
Path object if a path was found, None otherwise.
Example
q_initial = [0.0, -0.5, 0.0, -2.0, 0.0, 1.5, 0.75] translation_target = [0.5, 0.2, 0.4] path = planner.plan_to_translation_target(q_initial, translation_target)
- class isaacsim.robot_motion.cumotion.RmpFlowController(
- cumotion_robot: CumotionRobot,
- cumotion_world_interface: CumotionWorldInterface,
- robot_joint_space: list[str],
- robot_site_space: list[str],
- rmp_flow_configuration_filename: Path | str = 'rmp_flow.yaml',
- tool_frame: str | None = None,
- maximum_substep_size: float = 0.008333333333333333,
Bases:
BaseControllerReactive motion policy controller using cuMotion’s RMPflow algorithm.
RMPflow (Riemannian Motion Policies) is a reactive control algorithm that generates smooth, collision-free motions by combining multiple motion policies in task and configuration space. This controller continuously updates joint commands based on the desired targets.
Note
For performance,
reset()pre-allocates a single outputRobotStateandforward()returns that same instance on every call, mutating its joint buffer in place. Callers that need to retain a value acrossforward()calls must copy it out (seeforward()for details).- Parameters:
cumotion_robot – Robot containing kinematics and joint information.
cumotion_world_interface – World interface providing collision geometry.
robot_joint_space – The full ordered joint-space of the controlled robot.
robot_site_space – The full ordered site-space of the controlled robot. Used only to validate the tool-frame name.
rmp_flow_configuration_filename – Path to the RMPflow YAML configuration file. If a relative path is provided, it is resolved relative to cumotion_robot.directory. If an absolute path is provided, it is used as-is. Defaults to “rmp_flow.yaml”.
tool_frame – Name of the tool frame for end-effector control. Defaults to None, which uses the first tool frame defined in the robot description.
maximum_substep_size – Maximum timestep size (in seconds) used during Euler integration. When the frame duration exceeds this value, the integration is split into multiple substeps to improve numerical stability.
- Raises:
ValueError – If cumotion_robot.controlled_joint_names is not a subset of robot_joint_space.
ValueError – If tool_frame is not found in robot_site_space.
ValueError – If maximum_substep_size is not strictly positive.
RuntimeError – If no tool frames are available in the robot description and tool_frame is None.
Example
controller = RmpFlowController( cumotion_robot=robot, cumotion_world_interface=world_interface, rmp_flow_configuration_filename="rmp_flow.yaml" ) controller.reset(estimated_state, setpoint_state, t=0.0) desired_state = controller.forward(estimated_state, setpoint_state, t=0.1)
- forward(
- estimated_state: RobotState,
- setpoint_state: RobotState | None,
- t: float,
- **kwargs: Any,
Compute the desired joint action for the next time-step.
Evaluates the RMPflow controller to compute desired joint positions and velocities based on the current desired robot state and target attractors. The controller integrates the computed accelerations over time.
- Parameters:
estimated_state – Current estimated state of the robot.
setpoint_state – Desired setpoint state containing target attractors. Can include joint positions, end-effector positions, and/or orientations. End-effector inputs must match the tool frame defined at initialization for this controller.
t – Current clock time (simulation or real).
**kwargs – Additional arguments for the controller.
- Returns:
Robot state containing desired joint positions and velocities, or None if the controller is not initialized.
Warning
For performance,
forward()returns the sameRobotStateinstance on every call and mutates its underlying joint buffer in place. The returned object is a live view, not a snapshot.state_a is state_bisTruefor any two values returned byforward()betweenreset()calls.state.joints.data_arrayaliases the controller’s internal buffer and reflects the most recentforward()result.state.joints.positions/.velocitiesare lazily rebuilt after eachforward(); reading them after a subsequentforward()returns the new values.reset()re-allocates these objects, so references taken before areset()are orphaned (they keep their last values but are no longer updated).
If you need to retain a value across
forward()calls (for interpolation, logging, etc.), copy it out immediately, e.g.positions = desired_state.joints.positions.numpy().copy().
Example
desired_state = controller.forward(current_state, target_state, t=1.0) if desired_state is not None: robot.set_dof_position_targets( desired_state.joints.positions, indices=[0], dof_indices=robot.get_joint_indices(desired_state.joints.names) ) # Snapshot for later use; do not hold desired_state itself, # since the next forward() call will overwrite it. positions_t1 = desired_state.joints.positions.numpy().copy()
- get_rmp_flow_config() RmpFlowConfig#
Get the RMPflow configuration object.
Returns the underlying cuMotion configuration object, allowing users to modify controller parameters before initialization.
- Returns:
The cuMotion RMPflow configuration object.
Example
config = controller.get_rmp_flow_config() config.set_param("cspace_target_rmp/damping_gain", 0.9)
- reset(
- estimated_state: RobotState,
- setpoint_state: RobotState | None,
- t: float,
- **kwargs: Any,
Reset the controller to a safe initial state.
Initializes the RMPflow controller and sets the internal state to match the current robot configuration. This should be called before running the controller for the first time.
Note
reset()allocates a fresh outputRobotState/JointStatepair (the objects subsequently returned byforward()). AnyRobotStatereference obtained from a priorforward()call becomes orphaned afterreset(): it retains its last values but is no longer updated by futureforward()calls.- Parameters:
estimated_state – Current estimated state of the robot.
setpoint_state – Initial setpoint state (currently unused).
t – Current clock time (simulation or real).
**kwargs – Additional arguments for the controller.
- Returns:
True if reset was successful, False otherwise.
Example
success = controller.reset(current_state, None, t=0.0) if success: print("Controller initialized successfully")
- class isaacsim.robot_motion.cumotion.TrajectoryGenerator(
- cumotion_robot: CumotionRobot,
- robot_joint_space: list[str],
Bases:
objectTrajectory generator for creating smooth, time-optimal trajectories (not collision-aware).
This class provides utilities for generating smooth trajectories from discrete waypoints or path specifications. It handles conversion between configuration space and task space representations and generates time-optimal trajectories respecting joint velocity and acceleration limits.
- Parameters:
cumotion_robot – Robot configuration containing kinematics and joint information.
robot_joint_space – List of joint names defining the robot’s joint space.
- Raises:
ValueError – If cumotion controlled joints are not a subset of the robot_joint_space.
Example
generator = TrajectoryGenerator(robot_config, joint_names) trajectory = generator.generate_trajectory_from_cspace_waypoints( waypoints=[[0, 0, 0], [1, 1, 1], [2, 2, 2]] )
- generate_trajectory_from_cspace_waypoints(
- waypoints: array | ndarray | list[list[float]],
- times: array | ndarray | list[float] | None = None,
- interpolation_mode: InterpolationMode | None = None,
Generate a trajectory from configuration space waypoints.
Creates a smooth time-optimal trajectory passing through the specified joint configuration waypoints. Optionally, specific timing for each waypoint can be provided, or an interpolation mode can be specified.
- Parameters:
waypoints – Array of joint configurations, shape (n_waypoints, n_joints).
times – Optional time stamps for each waypoint. Defaults to None (automatic timing).
interpolation_mode – Interpolation method to use. Defaults to None (cuMotion default).
- Returns:
Generated trajectory, or None if generation failed.
- Raises:
RuntimeError – If waypoints is not two-dimensional.
RuntimeError – If fewer than 2 waypoints are provided.
RuntimeError – If waypoint dimension doesn’t match the number of controlled joints.
RuntimeError – If times is not one-dimensional.
RuntimeError – If the number of times doesn’t match the number of waypoints.
RuntimeError – If any time value is negative.
RuntimeError – If times are not strictly increasing.
Example
waypoints = [[0.0, -0.5, 0.0], [0.5, 0.0, 0.5], [1.0, 0.5, 1.0]] trajectory = generator.generate_trajectory_from_cspace_waypoints(waypoints) # With explicit timing waypoints = [[0, 0], [1, 1], [2, 2]] times = [0.0, 1.0, 2.0] trajectory = generator.generate_trajectory_from_cspace_waypoints( waypoints, times )
- generate_trajectory_from_path_specification(
- path_specification: CSpacePathSpec | TaskSpacePathSpec | CompositePathSpec,
- tool_frame_name: str | None = None,
- task_space_conversion_config: TaskSpacePathConversionConfig | None = None,
- inverse_kinematics_config: IkConfig | None = None,
Generate a trajectory from a cuMotion path specification.
Converts the provided path specification (which may be in configuration space, task space, or composite) into a smooth time-optimal trajectory (not collision-aware). Task space paths are converted to configuration space using inverse kinematics.
- Parameters:
path_specification – Path specification in cuMotion format (defined in base frame).
tool_frame_name – Name of the tool frame for task space planning. Defaults to None, which uses the first tool frame in the robot description.
task_space_conversion_config – Configuration for task space to configuration space conversion. Defaults to None.
inverse_kinematics_config – Configuration for inverse kinematics solver. Defaults to None.
- Returns:
Generated trajectory, or None if generation failed.
- Raises:
RuntimeError – If the path specification has fewer than 2 waypoints.
Example
path_spec = cumotion.create_cspace_path_spec( initial_cspace_position=np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]), ) path_spec.add_cspace_waypoint(np.array([1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])) path_spec.add_cspace_waypoint(np.array([2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0])) trajectory = generator.generate_trajectory_from_path_specification(path_spec)
- get_cspace_trajectory_generator() CSpaceTrajectoryGenerator#
Get the underlying cuMotion trajectory generator.
Returns the cuMotion generator object, allowing users to modify parameters directly.
- Returns:
The cuMotion configuration space trajectory generator.
Example
gen = generator.get_cspace_trajectory_generator() gen.set_velocity_limits(np.array([0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]))
- class isaacsim.robot_motion.cumotion.TrajectoryOptimizer(
- cumotion_robot: CumotionRobot,
- robot_joint_space: list[str],
- cumotion_world_interface: CumotionWorldInterface,
- tool_frame: str | None = None,
- trajectory_optimizer_config_filename: Path | str | None = None,
Bases:
objectTrajectory optimizer using cuMotion’s Trajectory Optimizer algorithm.
This class provides trajectory optimization capabilities. It generates smooth, collision-free trajectories to configuration space or task space targets by optimizing over trajectory costs including smoothness, collision avoidance, and goal achievement.
- Parameters:
cumotion_robot – Robot configuration containing kinematics and joint information.
robot_joint_space – List of joint names defining the robot’s joint space.
cumotion_world_interface – World interface providing collision geometry.
tool_frame – Name of the tool frame for task space planning. Defaults to None, which uses the first tool frame defined in the robot description.
trajectory_optimizer_config_filename – Path to the YAML configuration file. If a relative path is provided, it is resolved relative to cumotion_robot.directory. If an absolute path is provided, it is used as-is. Defaults to None (uses default parameters).
Example
optimizer = TrajectoryOptimizer( cumotion_robot=robot_config, robot_joint_space=joint_names, cumotion_world_interface=world_interface, ) # See cuMotion documentation for creating target specifications trajectory = optimizer.plan_to_goal(q_initial, cspace_target)
- get_cumotion_robot() CumotionRobot#
Get the robot configuration.
- Returns:
The robot configuration used by this optimizer.
- get_trajectory_optimizer_config() TrajectoryOptimizerConfig#
Get the trajectory optimizer configuration.
Returns the underlying cuMotion configuration object, allowing users to modify optimizer parameters before planning.
- Returns:
The cuMotion trajectory optimizer configuration object.
Example
config = optimizer.get_trajectory_optimizer_config() config.set_param("trajopt/pbo/num_iterations", cumotion.TrajectoryOptimizerConfig.ParamValue(100))
- plan_to_goal(
- initial_cspace_position: array | ndarray | list[float],
- goal: CSpaceTarget | TaskSpaceTargetGoalset | TaskSpaceTarget,
Plan a trajectory to a specified goal.
Generates a smooth, collision-free trajectory from the initial configuration to the specified goal. The goal can be a configuration space target, task space target, or task space goalset.
- Parameters:
initial_cspace_position – Initial joint configuration.
goal – Target goal specification (CSpaceTarget, TaskSpaceTarget, or TaskSpaceTargetGoalset). All goals must be defined in the base frame.
- Returns:
Optimized trajectory if successful, None if planning failed.
- Raises:
ValueError – If goal type is not one of the supported types.
Example
# Configuration space target q_initial = [0.0, -0.5, 0.0, -2.0, 0.0, 1.5, 0.75] # See cuMotion documentation for constructing CSpaceTarget, # TaskSpaceTarget, or TaskSpaceTargetGoalset objects trajectory = optimizer.plan_to_goal(q_initial, target)
- isaacsim.robot_motion.cumotion.load_cumotion_robot(
- directory: Path | str,
- urdf_filename: Path | str = 'robot.urdf',
- xrdf_filename: Path | str = 'robot.xrdf',
Load a cuMotion robot from URDF and XRDF files.
Loads the robot description from the specified URDF and XRDF files and creates a robot object containing the robot description, kinematics solver, and controlled joint names.
- Parameters:
directory – Path to the directory containing the robot configuration files.
urdf_filename – Name of the URDF file. Defaults to “robot.urdf”.
xrdf_filename – Name of the XRDF file. Defaults to “robot.xrdf”.
- Returns:
Robot object containing all necessary data for cuMotion.
- Raises:
FileNotFoundError – If the URDF/XRDF files cannot be found.
Exception – If the URDF/XRDF files cannot be loaded or parsed.
Example
robot = load_cumotion_robot( directory="/path/to/franka", urdf_filename="robot.urdf", xrdf_filename="robot.xrdf" )
- isaacsim.robot_motion.cumotion.load_cumotion_supported_robot(
- robot_name: str,
Load a cuMotion robot for a supported robot.
Loads a pre-configured robot from the package’s
robot_configurationsdirectory. This is a convenience function for commonly used robots bundled with the wheel.- Parameters:
robot_name – Name of the robot (e.g., “franka”, “ur10”).
- Returns:
Robot object for the specified robot.
- Raises:
FileNotFoundError – If the robot cannot be found or loaded.
Example
robot = load_cumotion_supported_robot("franka")