Jetbot Robot [omni.isaac.jebot]¶
Jetbot¶
-
class
Jetbot
(prim_path: str, name: str = 'jetbot', usd_path: Optional[str] = None, position: Optional[numpy.ndarray] = None, orientation: Optional[numpy.ndarray] = None)¶ [summary]
- Parameters
stage (Usd.Stage) – [description]
prim_path (str) – [description]
name (str) – [description]
usd_path (str, optional) – [description]
position (Optional[np.ndarray], optional) – [description]. Defaults to None.
orientation (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.
-
apply_wheel_actions
(actions: omni.isaac.core.utils.types.ArticulationAction) → None¶ [summary]
- Parameters
actions (ArticulationAction) – [description]
-
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
-
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
-
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
-
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
-
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
-
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
-
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_wheel_positions
() → Tuple[float, float]¶ [summary]
- Returns
[description]
- Return type
Tuple[float, float]
-
get_wheel_velocities
() → Tuple[float, float]¶ [summary]
- Returns
[description]
- Return type
Tuple[np.ndarray, np.ndarray]
-
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
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_wheel_positions
(positions: Tuple[float, float]) → None¶ [summary]
- Parameters
positions (Tuple[float, float]) – [description]
-
set_wheel_velocities
(velocities: Tuple[float, float]) → None¶ [summary]
- Parameters
velocities (Tuple[float, float]) – [description]
-
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.
-
property
wheel_dof_indices
¶ [summary]
- Returns
[description]
- Return type
int
Jetbot Controllers¶
-
class
DifferentialController
(name: str, wheel_radius=3, wheel_base=11.25)¶ Controller uses unicycle model for a diffrential drive
- Parameters
name (str) – [description]
wheel_radius (float) – Radius of left and right wheels in cms
wheel_base (float) – Distance between left and right wheels in cms
-
forward
(command: numpy.ndarray) → omni.isaac.core.utils.types.ArticulationAction¶ [summary]
- Parameters
command (np.ndarray) – [description]
- Returns
[description]
- Return type
-
reset
() → None¶ [summary]