Dofbot Robot [omni.isaac.dofbot]

Dofbot

class DofBot(prim_path: str, name: str = 'dofbot_robot', usd_path: Optional[str] = None, position: Optional[numpy.ndarray] = None, orientation: Optional[numpy.ndarray] = None, end_effector_prim_name: Optional[str] = None, gripper_dof_names: Optional[List[str]] = None, gripper_open_position: Optional[numpy.ndarray] = None, gripper_closed_position: Optional[numpy.ndarray] = None)

[summary]

Parameters
  • prim_path (str) – [description]

  • name (str, optional) – [description]. Defaults to “dofbot_robot”.

  • usd_path (Optional[str], optional) – [description]. Defaults to None.

  • position (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • orientation (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • end_effector_prim_name (Optional[str], optional) – [description]. Defaults to None.

  • gripper_dof_names (Optional[List[str]], optional) – [description]. Defaults to None.

  • gripper_open_position (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • gripper_closed_position (Optional[np.ndarray], optional) – [description]. Defaults to None.

apply_action(control_actions: omni.isaac.core.utils.types.ArticulationAction, indices: Optional[Union[List, numpy.ndarray]] = None)None

[summary]

Parameters
  • control_actions (ArticulationAction) – actions to be applied for next physics step.

  • indices (Optional[Union[list, np.ndarray]], optional) – degree of freedom indices to apply actions to. Defaults to all degrees of freedom.

Raises

Exception – [description]

apply_visual_material(visual_material: omni.isaac.core.materials.visual_material.VisualMaterial, weaker_than_descendants: bool = False)None

Used to apply visual material to the held prim and optionally its descendants.

Parameters
  • visual_material (VisualMaterial) – visual material to be applied to the held prim. Currently supports PreviewSurface, OmniPBR and OmniGlass.

  • weaker_than_descendants (bool, optional) – True if the material shouldn’t override the descendants materials, otherwise False. Defaults to False.

property articulation_handle

[summary]

Returns

[description]

Return type

int

change_prim_path(new_prim_path: str)None

Moves prim from the old path to a new one.

Parameters

new_prim_path (str) – new path of the prim to be moved to.

disable_gravity()None

[summary]

property dof_properties

[summary]

Returns

[description]

Return type

np.ndarray

property end_effector

[summary]

Returns

[description]

Return type

RigidPrim

get_angular_velocity()numpy.ndarray

[summary]

Returns

[description]

Return type

np.ndarray

get_applied_action()omni.isaac.core.utils.types.ArticulationAction

[summary]

Raises

Exception – [description]

Returns

[description]

Return type

ArticulationAction

get_applied_visual_material()omni.isaac.core.materials.visual_material.VisualMaterial
Returns the current applied visual material in case it was applied using apply_visual_material OR

it’s one of the following materials that was already applied before: PreviewSurface, OmniPBR and OmniGlass.

Returns

the current applied visual material if its type is currently supported.

Return type

VisualMaterial

get_articulation_body_count()int

[summary]

Returns

[description]

Return type

int

get_articulation_controller()omni.isaac.core.controllers.articulation_controller.ArticulationController
Returns

PD Controller of all degrees of freedom of an articulation, can apply position targets, velocity targets and efforts.

Return type

ArticulationController

get_default_state()omni.isaac.core.utils.types.XFormPrimState
Returns

returns the default state of the prim (position and orientation) that is used after each reset.

Return type

XFormPrimState

get_dof_index(dof_name: str)int

[summary]

Parameters

dof_name (str) – [description]

Returns

[description]

Return type

int

get_enabled_self_collisions()bool

[summary]

Returns

[description]

Return type

bool

get_joint_efforts()numpy.ndarray

[summary]

Raises

Exception – [description]

Returns

[description]

Return type

np.ndarray

get_joint_positions()numpy.ndarray

[summary]

Raises

Exception – [description]

Returns

[description]

Return type

np.ndarray

get_joint_velocities()numpy.ndarray

[summary]

Raises

Exception – [description]

Returns

[description]

Return type

np.ndarray

get_joints_state()omni.isaac.core.utils.types.JointsState

[summary]

Returns

[description]

Return type

JointsState

get_linear_velocity()numpy.ndarray

[summary]

Returns

[description]

Return type

np.ndarray

get_local_pose()Tuple[numpy.ndarray, numpy.ndarray]

Gets prim’s pose with respect to the local frame (the prim’s parent frame).

Returns

first index is position in the local frame of the prim. shape is (3, ).

second index is quaternion orientation in the local frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).

Return type

Tuple[np.ndarray, np.ndarray]

get_local_scale()numpy.ndarray

Gets prim’s scale with respect to the local frame (the parent’s frame).

Returns

scale applied to the prim’s dimensions in the local frame. shape is (3, ).

Return type

np.ndarray

get_sleep_threshold()float

[summary]

Returns

[description]

Return type

float

get_solver_position_iteration_count()int

[summary]

Returns

[description]

Return type

int

get_solver_velocity_iteration_count()int

[summary]

Returns

[description]

Return type

int

get_stabilization_threshold()float

[summary]

Returns

[description]

Return type

float

get_visibility()bool
Returns

true if the prim is visible in stage. false otherwise.

Return type

bool

get_world_pose()Tuple[numpy.ndarray, numpy.ndarray]

Gets prim’s pose with respect to the world’s frame.

Returns

first index is position in the world frame of the prim. shape is (3, ).

second index is quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ).

Return type

Tuple[np.ndarray, np.ndarray]

get_world_scale()numpy.ndarray

Gets prim’s scale with respect to the world’s frame.

Returns

scale applied to the prim’s dimensions in the world frame. shape is (3, ).

Return type

np.ndarray

property gripper

[summary]

Returns

[description]

Return type

ArticulationGripper

property handles_initialized

[summary]

Returns

[description]

Return type

bool

initialize()None

[summary]

is_valid()bool
Returns

True is the current prim path corresponds to a valid prim in stage. False otherwise.

Return type

bool

is_visual_material_applied()bool
Returns

True if there is a visual material applied. False otherwise.

Return type

bool

property name

Returns: str: name given to the prim when instantiating it. Otherwise None.

property num_dof

[summary]

Returns

[description]

Return type

int

post_reset()None

[summary]

property prim

Returns: Usd.Prim: USD Prim object that this object holds.

property prim_path

Returns: str: prim path in the stage.

read_kinematic_hierarchy()None

[summary]

set_angular_velocity(velocity: numpy.ndarray)None

[summary]

Parameters

velocity (np.ndarray) – [description]

set_default_state(position: Optional[numpy.ndarray] = None, orientation: Optional[numpy.ndarray] = None)None

Sets the default state of the prim (position and orientation), that will be used after each reset.

Parameters
  • position (Optional[np.ndarray], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[np.ndarray], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

set_enabled_self_collisions(flag: bool)None

[summary]

Parameters

flag (bool) – [description]

set_joint_efforts(efforts: numpy.ndarray, indices: Optional[Union[List, numpy.ndarray]] = None)None

[summary]

Parameters
  • efforts (np.ndarray) – [description]

  • indices (Optional[Union[list, np.ndarray]], optional) – [description]. Defaults to None.

Raises

Exception – [description]

set_joint_positions(positions: numpy.ndarray, indices: Optional[Union[List, numpy.ndarray]] = None)None

[summary]

Parameters
  • positions (np.ndarray) – [description]

  • indices (Optional[Union[list, np.ndarray]], optional) – [description]. Defaults to None.

Raises

Exception – [description]

set_joint_velocities(velocities: numpy.ndarray, indices: Optional[Union[List, numpy.ndarray]] = None)None

[summary]

Parameters
  • velocities (np.ndarray) – [description]

  • indices (Optional[Union[list, np.ndarray]], optional) – [description]. Defaults to None.

Raises

Exception – [description]

set_joints_default_state(positions: Optional[numpy.ndarray] = None, velocities: Optional[numpy.ndarray] = None, efforts: Optional[numpy.ndarray] = None)None

[summary]

Parameters
  • positions (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • velocities (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • efforts (Optional[np.ndarray], optional) – [description]. Defaults to None.

set_linear_velocity(velocity: numpy.ndarray)

Sets the linear velocity of the prim in stage.

Parameters

velocity (np.ndarray) – linear velocity to set the rigid prim to. Shape (3,).

set_local_pose(translation: Optional[numpy.ndarray] = None, orientation: Optional[numpy.ndarray] = None)None

Sets prim’s pose with respect to the local frame (the prim’s parent frame).

Parameters
  • translation (Optional[np.ndarray], optional) – translation in the local frame of the prim (with respect to its parent prim). shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[np.ndarray], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

set_local_scale(scale: Optional[numpy.ndarray])None

Sets prim’s scale with respect to the local frame (the prim’s parent frame).

Parameters

scale (Optional[np.ndarray]) – scale to be applied to the prim’s dimensions. shape is (3, ). Defaults to None, which means left unchanged.

set_sleep_threshold(threshold: float)None

[summary]

Parameters

threshold (float) – [description]

set_solver_position_iteration_count(count: int)None

[summary]

Parameters

count (int) – [description]

set_solver_velocity_iteration_count(count: int)

[summary]

Parameters

count (int) – [description]

set_stabilization_threshold(threshold: float)None

[summary]

Parameters

threshold (float) – [description]

set_visibility(visible: bool)None

Sets the visibility of the prim in stage.

Parameters

visible (bool) – flag to set the visibility of the usd prim in stage.

set_world_pose(position: Optional[numpy.ndarray] = None, orientation: Optional[numpy.ndarray] = None)None

Sets prim’s pose with respect to the world’s frame.

Parameters
  • position (Optional[np.ndarray], optional) – position in the world frame of the prim. shape is (3, ). Defaults to None, which means left unchanged.

  • orientation (Optional[np.ndarray], optional) – quaternion orientation in the world frame of the prim. quaternion is scalar-first (w, x, y, z). shape is (4, ). Defaults to None, which means left unchanged.

Dofbot IK Solver

class InverseKinematicsSolver(name: str, robot_prim_path: str, robot_urdf_path: Optional[str] = None, robot_description_yaml_path: Optional[str] = None, end_effector_frame_name: Optional[str] = None)

[summary]

Parameters
  • name (str) – [description]

  • robot_prim_path (str) – [description]

  • robot_urdf_path (Optional[str], optional) – [description]. Defaults to None.

  • robot_description_yaml_path (Optional[str], optional) – [description]. Defaults to None.

  • end_effector_frame_name (Optional[str], optional) – [description]. Defaults to None.

forward(target_end_effector_position: numpy.ndarray, target_end_effector_orientation: Optional[numpy.ndarray] = None)omni.isaac.core.utils.types.ArticulationAction

[summary]

Parameters
  • target_end_effector_position (np.ndarray) – [description]

  • target_end_effector_orientation (Optional[np.ndarray], optional) – [description]. Defaults to None.

Returns

[description]

Return type

ArticulationAction

reset()None

[summary]

Dofbot Controllers

class GripperController(name: str, gripper_dof_indices: List[int], deltas: Optional[numpy.ndarray] = None)

[summary]

Parameters
  • name (str) – [description]

  • gripper_dof_indices (List[int]) – [description]

  • deltas (Optional[np.ndarray], optional) – [description]. Defaults to None.

close(current_joint_positions: numpy.ndarray)omni.isaac.core.utils.types.ArticulationAction

[summary]

Parameters

current_joint_positions (np.ndarray) – [description]

Returns

[description]

Return type

ArticulationAction

forward(action: str, current_joint_positions: numpy.ndarray)omni.isaac.core.utils.types.ArticulationAction

Action has be “open” or “close”

Parameters
  • action (str) – “open” or “close”

  • current_joint_positions (np.ndarray) – [description]

Raises

Exception – [description]

Returns

[description]

Return type

ArticulationAction

get_deltas()numpy.ndarray

[summary]

Returns

[description]

Return type

np.ndarray

property grippers_dof_indices

[summary]

Returns

[description]

Return type

List[int]

open(current_joint_positions: numpy.ndarray)omni.isaac.core.utils.types.ArticulationAction

[summary]

Parameters

current_joint_positions (np.ndarray) – [description]

Returns

[description]

Return type

ArticulationAction

reset()None

[summary]

set_deltas(deltas: numpy.ndarray)None

[summary]

Parameters

deltas (np.ndarray) – [description]

class PickPlaceController(name: str, gripper_dof_indices: List[int], robot_prim_path: str, event_velocities: Optional[List[float]] = None)

[summary]

Parameters
  • name (str) – [description]

  • gripper_dof_indices (List[int]) – [description]

  • robot_prim_path (str) – [description]

  • event_velocities (Optional[List[float]], optional) – [description]. Defaults to None.

forward(picking_position: numpy.ndarray, placing_position: numpy.ndarray, current_joint_positions: numpy.ndarray, end_effector_offset: Optional[numpy.ndarray] = None, end_effector_orientation: Optional[numpy.ndarray] = None)omni.isaac.core.utils.types.ArticulationAction

[summary]

Parameters
  • picking_position (np.ndarray) – [description]

  • placing_position (np.ndarray) – [description]

  • current_joint_positions (np.ndarray) – [description]

  • end_effector_offset (typing.Optional[np.ndarray], optional) – [description]. Defaults to None.

  • end_effector_orientation (typing.Optional[np.ndarray], optional) – [description]. Defaults to None.

Returns

[description]

Return type

ArticulationAction

get_current_event()int

[summary]

Returns

[description]

Return type

int

is_done()bool

[summary]

Returns

[description]

Return type

bool

is_paused()bool

[summary]

Returns

[description]

Return type

bool

pause()None

[summary]

reset(start_picking_height: Optional[float] = None, event_velocities: Optional[List[float]] = None)None

[summary]

Parameters
  • start_picking_height (typing.Optional[float], optional) – [description]. Defaults to None.

  • event_velocities (typing.Optional[typing.List[float]], optional) – [description]. Defaults to None.

Raises
  • Exception – [description]

  • Exception – [description]

resume()None

[summary]

class RMPFlowController(name: str, robot_prim_path: str, physics_dt: float = 0.016666666666666666)

[summary]

Parameters
  • name (str) – [description]

  • robot_prim_path (str) – [description]

  • physics_dt (float, optional) – [description]. Defaults to 1.0/60.0.

add_cube_obstacle(cube_prim: pxr.Usd.Prim)None

[summary]

Parameters

cube_prim (Usd.Prim) – [description]

forward(target_end_effector_position: numpy.ndarray, target_end_effector_orientation: Optional[numpy.ndarray] = None)omni.isaac.core.utils.types.ArticulationAction

[summary]

Parameters
  • target_end_effector_position (np.ndarray) – [description]

  • target_end_effector_orientation (Optional[np.ndarray], optional) – [description]. Defaults to None.

Returns

[description]

Return type

ArticulationAction

get_motion_generation()omni.isaac.motion_generation.motion_generation.MotionGenerator

[summary]

Returns

[description]

Return type

MotionGenerator

remove_cube_obstacle(cube_prim: pxr.Usd.Prim)None

[summary]

Parameters

cube_prim (Usd.Prim) – [description]

reset()None

[summary]

Dofbot Tasks

class FollowTarget(name: str = 'dofbot_follow_target', target_prim_path: Optional[str] = None, target_name: Optional[str] = None, target_position: Optional[numpy.ndarray] = None, target_orientation: Optional[numpy.ndarray] = None, offset: Optional[numpy.ndarray] = None, dofbot_prim_path: Optional[str] = None, dofbot_robot_name: Optional[str] = None)

[summary]

Parameters
  • name (str, optional) – [description]. Defaults to “dofbot_follow_target”.

  • target_prim_path (Optional[str], optional) – [description]. Defaults to None.

  • target_name (Optional[str], optional) – [description]. Defaults to None.

  • target_position (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • target_orientation (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • offset (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • dofbot_prim_path (Optional[str], optional) – [description]. Defaults to None.

  • dofbot_robot_name (Optional[str], optional) – [description]. Defaults to None.

add_obstacle(position: Optional[numpy.ndarray] = None)

[summary]

Parameters

position (np.ndarray, optional) – [description]. Defaults to np.array([0.1, 0.1, 1.0]).

calculate_metrics()dict

[summary]

cleanup()None

[summary]

get_description()str

[summary]

Returns

[description]

Return type

str

get_observations()dict

[summary]

Returns

[description]

Return type

dict

get_obstacle_to_delete()None

[summary]

Returns

[description]

Return type

[type]

get_params()dict

[summary]

Returns

[description]

Return type

dict

get_task_objects()dict

[summary]

Returns

[description]

Return type

dict

is_done()bool

[summary]

property name

[summary]

Returns

[description]

Return type

str

obstacles_exist()bool

[summary]

Returns

[description]

Return type

bool

post_reset()None

[summary]

pre_step(control_index: int, simulation_time: float)None

[summary]

Parameters
  • control_index (int) – [description]

  • simulation_time (float) – [description]

remove_obstacle(name: Optional[str] = None)None

[summary]

Parameters

name (Optional[str], optional) – [description]. Defaults to None.

property scene

Scene of the world

Returns

[description]

Return type

Scene

set_params(target_prim_path: Optional[str] = None, target_name: Optional[str] = None, target_position: Optional[numpy.ndarray] = None, target_orientation: Optional[numpy.ndarray] = None)None

[summary]

Parameters
  • target_prim_path (Optional[str], optional) – [description]. Defaults to None.

  • target_name (Optional[str], optional) – [description]. Defaults to None.

  • target_position (Optional[np.ndarray], optional) – [description]. Defaults to None.

  • target_orientation (Optional[np.ndarray], optional) – [description]. Defaults to None.

set_robot()omni.isaac.dofbot.dofbot.DofBot

[summary]

Returns

[description]

Return type

DofBot

set_up_scene(scene: omni.isaac.core.scenes.scene.Scene)None

[summary]

Parameters

scene (Scene) – [description]

target_reached()bool

[summary]

Returns

[description]

Return type

bool

class PickPlace(name: str = 'dofbot_pick_place', cube_initial_position: Optional[numpy.ndarray] = None, cube_initial_orientation: Optional[numpy.ndarray] = None, target_position: Optional[numpy.ndarray] = None, cube_size: Optional[numpy.ndarray] = None, offset: Optional[numpy.ndarray] = None)
calculate_metrics()dict

[summary]

cleanup()None

Called before calling a reset() on the world to removed temporarly objects that were added during simulation for instance.

get_description()str

[summary]

Returns

[description]

Return type

str

get_observations()dict

[summary]

Returns

[description]

Return type

dict

get_params()dict
Gets the params of the task,

should have the form of params_representation[“param_name”] = {“value”: param_value, “modifiable”: bool} Will be consumed by the task UI to change the params in an easy way.

Raises

NotImplementedError – [description]

Returns

[description]

Return type

dict

get_task_objects()dict

[summary]

Returns

[description]

Return type

dict

is_done()bool

[summary]

property name

[summary]

Returns

[description]

Return type

str

post_reset()None

Calls while doing a .reset() on the world.

pre_step(control_index: int, simulation_time: float)None

[summary]

Parameters
  • control_index (int) – [description]

  • simulation_time (float) – [description]

property scene

Scene of the world

Returns

[description]

Return type

Scene

set_params(cube_position: Optional[numpy.ndarray] = None, cube_orientation: Optional[numpy.ndarray] = None, target_position: Optional[numpy.ndarray] = None)None

Changes the modifiable paramateres of the task

Raises

NotImplementedError – [description]

set_robot()omni.isaac.dofbot.dofbot.DofBot

[summary]

Returns

[description]

Return type

DofBot

set_up_scene(scene: omni.isaac.core.scenes.scene.Scene)None

[summary]

Parameters

scene (Scene) – [description]