Robot and articulation configuration#
A jointed robot is represented as an articulation in Isaac Lab. This guide covers reusing
an existing robot configuration and authoring a new ArticulationCfg.
The ArticulationCfg is a configuration object that defines the
properties of an Articulation in Isaac Lab.
Note
While we only cover the creation of an ArticulationCfg in this guide,
the process is similar for creating any other asset configuration object.
Reusing a robot configuration#
Maintained robot configurations live in source/isaaclab_assets/isaaclab_assets/robots.
Import a configuration from isaaclab_assets and copy it before changing its spawn
properties, initial state, or actuators. Keep project-specific configurations in a Python
module in your own project; they do not need to be added to Isaac Lab.
Import clone and replace from isaaclab.utils. For example,
robot_cfg = clone(CARTPOLE_CFG) creates an independent configuration.
Use replace(robot_cfg, prim_path="{ENV_REGEX_NS}/Robot") when adding it to an
InteractiveSceneCfg. The physics backend is selected separately from
this robot configuration, as explained below.
We will use the Cartpole example to demonstrate how to create an ArticulationCfg.
The Cartpole is a simple robot that consists of a cart with a pole attached to it. The cart
is free to move along a rail, and the pole is free to rotate about the cart. The file for this configuration example is
source/isaaclab_assets/isaaclab_assets/robots/cartpole.py.
Code for Cartpole configuration
1# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
2# All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5
6"""Configuration for a simple Cartpole robot."""
7
8from isaaclab_newton.sim.schemas import NewtonArticulationCfg
9from isaaclab_physx.sim.schemas import PhysxArticulationCfg, PhysxRigidBodyCfg
10
11import isaaclab.sim as sim_utils
12from isaaclab.actuators import ImplicitActuatorCfg
13from isaaclab.assets import ArticulationCfg
14from isaaclab.utils.assets import ISAACLAB_NUCLEUS_DIR
15
16##
17# Configuration
18##
19
20CARTPOLE_CFG = ArticulationCfg(
21 spawn=sim_utils.UsdFileCfg(
22 usd_path=f"{ISAACLAB_NUCLEUS_DIR}/Robots/Classic/Cartpole/cartpole.usd",
23 rigid_props=[
24 sim_utils.UsdPhysicsRigidBodyCfg(rigid_body_enabled=True),
25 PhysxRigidBodyCfg(
26 max_linear_velocity=1000.0,
27 max_angular_velocity=1000.0,
28 max_depenetration_velocity=100.0,
29 enable_gyroscopic_forces=True,
30 ),
31 ],
32 articulation_props=[
33 PhysxArticulationCfg(
34 enabled_self_collisions=False,
35 solver_position_iteration_count=4,
36 solver_velocity_iteration_count=0,
37 sleep_threshold=0.005,
38 stabilization_threshold=0.001,
39 ),
40 NewtonArticulationCfg(self_collision_enabled=False),
41 ],
42 ),
43 init_state=ArticulationCfg.InitialStateCfg(
44 pos=(0.0, 0.0, 2.0), joint_pos={"slider_to_cart": 0.0, "cart_to_pole": 0.0}
45 ),
46 actuators={
47 "cart_actuator": ImplicitActuatorCfg(
48 joint_names_expr=["slider_to_cart"],
49 joint_effort_limit=400.0,
50 stiffness=0.0,
51 damping=10.0,
52 ),
53 "pole_actuator": ImplicitActuatorCfg(
54 joint_names_expr=["cart_to_pole"], joint_effort_limit=400.0, stiffness=0.0, damping=0.0
55 ),
56 },
57)
58"""Configuration for a simple Cartpole robot."""
Defining the spawn configuration#
As explained in Spawning prims into the scene tutorials, the spawn configuration defines the properties of the assets to be spawned. This spawning may happen procedurally, or through an existing asset file (e.g. USD or URDF). In this example, we will spawn the Cartpole from a USD file.
When spawning an asset from a USD file, we define its UsdFileCfg.
This configuration object takes in the following parameters:
usd_path: The USD file path to spawn fromrigid_props: The properties of the articulation’s rigid-body linksarticulation_props: The properties of the articulation root
The last two parameters are optional. If not specified, they are kept at their default values in the USD file.
spawn=sim_utils.UsdFileCfg(
usd_path=f"{ISAACLAB_NUCLEUS_DIR}/Robots/Classic/Cartpole/cartpole.usd",
rigid_props=[
sim_utils.UsdPhysicsRigidBodyCfg(rigid_body_enabled=True),
PhysxRigidBodyCfg(
max_linear_velocity=1000.0,
max_angular_velocity=1000.0,
max_depenetration_velocity=100.0,
enable_gyroscopic_forces=True,
),
],
articulation_props=[
PhysxArticulationCfg(
enabled_self_collisions=False,
solver_position_iteration_count=4,
solver_velocity_iteration_count=0,
sleep_threshold=0.005,
stabilization_threshold=0.001,
),
NewtonArticulationCfg(self_collision_enabled=False),
],
),
To import articulation from a URDF file instead of a USD file, you can replace the
UsdFileCfg with a UrdfFileCfg.
For more details, please check the API documentation.
Defining the initial state#
Every asset requires defining their initial or default state in the simulation through its configuration. This configuration is stored into the asset’s default state buffers that can be accessed when the asset’s state needs to be reset.
Note
The initial state of an asset is defined w.r.t. its local environment frame. This then needs to be transformed into the global simulation frame when resetting the asset’s state. For more details, please check the Interacting with an articulation tutorial.
For an articulation, the InitialStateCfg object defines the
initial state of the root of the articulation and the initial state of all its joints. In this
example, we will spawn the Cartpole at the origin of the XY plane at a Z height of 2.0 meters.
Meanwhile, the joint positions and velocities are set to 0.0.
init_state=ArticulationCfg.InitialStateCfg(
pos=(0.0, 0.0, 2.0), joint_pos={"slider_to_cart": 0.0, "cart_to_pole": 0.0}
),
Defining the actuator configuration#
Actuators are a crucial component of an articulation. Through this configuration, it is possible to define the type of actuator model to use. We can use the internal actuator model provided by the physics engine (i.e. the implicit actuator model), or use a custom actuator model which is governed by a user-defined system of equations (i.e. the explicit actuator model). For more details on actuators, see Actuators.
The cartpole’s articulation has two actuators, one corresponding to its each joint:
cart_to_pole and slider_to_cart. We use two different actuator models for these actuators as
an example. However, since they are both using the same actuator model, it is possible
to combine them into a single actuator model.
Actuator model configuration with separate actuator models
actuators={
"cart_actuator": ImplicitActuatorCfg(
joint_names_expr=["slider_to_cart"],
joint_effort_limit=400.0,
stiffness=0.0,
damping=10.0,
),
"pole_actuator": ImplicitActuatorCfg(
joint_names_expr=["cart_to_pole"], joint_effort_limit=400.0, stiffness=0.0, damping=0.0
),
},
Actuator model configuration with a single actuator model
actuators={
"all_joints": ImplicitActuatorCfg(
joint_names_expr=[".*"],
joint_effort_limit=400.0,
joint_velocity_limit=100.0,
stiffness={"slider_to_cart": 0.0, "cart_to_pole": 0.0},
damping={"slider_to_cart": 10.0, "cart_to_pole": 0.0},
),
},
Note
Newton resolves the target mode of joints configured with
ImplicitActuatorCfg before solver construction:
stiffness-only selects position mode, damping-only velocity mode, both gains
combined position/velocity mode, and zero gains effort mode. A gain of
None retains the imported USD value; explicit actuator configurations use
effort mode. Zero-gain USD drives therefore need no placeholder solely for a
configured actuator. See Joint drives on each physics backend for when
ensure_drives_exist
remains useful.
ActuatorCfg velocity/effort limits considerations#
Use the following fields in an actuator configuration. They select joints and are resolved when the
articulation is constructed; the canonical runtime values live on
ArticulationData. See Joint and actuator property ownership for the
ownership model and runtime mutation paths.
Field |
Implicit actuator |
Explicit actuator |
|---|---|---|
|
Writes the solver drive effort limit. |
Writes the solver effort limit; defaults high to avoid a second model clip. |
|
Not supported. |
Clips actuator-model output. |
|
Requests a solver velocity constraint. |
Requests a solver velocity constraint. |
|
Creates the soft velocity-limit snapshot; it is not a solver request. |
Describes the actuator rated speed; speed-dependent models use it in their torque curve. |
|
Deprecated alias for |
Deprecated alias for |
|
Deprecated alias for |
Deprecated alias for |
Solver velocity enforcement is backend-dependent. joint_velocity_limit records the requested
joint state but is not a backend-independent safety clamp; see Validate actuators and limits.
USD vs. ActuatorCfg discrepancy resolution#
USD having default value and the fact that ActuatorCfg can be specified with None, or a overriding value can sometime be confusing what exactly gets written into simulation. The resolution follows these simple rules,per joint and per property:
Condition |
ActuatorCfg Value |
Applied |
|---|---|---|
No override provided |
Not Specified |
USD Value |
Override provided |
User’s ActuatorCfg |
Same as ActuatorCfg |
Digging into USD can sometime be unconvinent, to help clarify what exact value is written, we designed a flag
actuator_value_resolution_debug_print,
to help user figure out what exact value gets used in simulation.
Whenever an actuator parameter is overridden in the user’s ActuatorCfg (or left unspecified), we compare it to the value read from the USD definition and record any differences. For each joint and each property, if unmatching value is found, we log the resolution:
USD Value The default limit or gain parsed from the USD asset.
ActuatorCfg Value The user-provided override (or “Not Specified” if none was given).
Applied The final value actually used for simulation: if the user didn’t override it, this matches the USD value; otherwise it reflects the user’s setting.
This resolution info is emitted as a warning table only when discrepancies exist. Here’s an example of what you’ll see:
+----------------+------------------------+---------------------+----+-------------+--------------------+----------+
| Group | Property | Name | ID | USD Value | ActuatorCfg Value | Applied |
+----------------+------------------------+---------------------+----+-------------+--------------------+----------+
| panda_shoulder | joint_velocity_limit | panda_joint1 | 0 | 2.17e+00 | Not Specified | 2.17e+00 |
| | | panda_joint2 | 1 | 2.17e+00 | Not Specified | 2.17e+00 |
| | | panda_joint3 | 2 | 2.17e+00 | Not Specified | 2.17e+00 |
| | | panda_joint4 | 3 | 2.17e+00 | Not Specified | 2.17e+00 |
| | stiffness | panda_joint1 | 0 | 2.29e+04 | 8.00e+01 | 8.00e+01 |
| | | panda_joint2 | 1 | 2.29e+04 | 8.00e+01 | 8.00e+01 |
| | | panda_joint3 | 2 | 2.29e+04 | 8.00e+01 | 8.00e+01 |
| | | panda_joint4 | 3 | 2.29e+04 | 8.00e+01 | 8.00e+01 |
| | damping | panda_joint1 | 0 | 4.58e+03 | 4.00e+00 | 4.00e+00 |
| | | panda_joint2 | 1 | 4.58e+03 | 4.00e+00 | 4.00e+00 |
| | | panda_joint3 | 2 | 4.58e+03 | 4.00e+00 | 4.00e+00 |
| | | panda_joint4 | 3 | 4.58e+03 | 4.00e+00 | 4.00e+00 |
| | armature | panda_joint1 | 0 | 0.00e+00 | Not Specified | 0.00e+00 |
| | | panda_joint2 | 1 | 0.00e+00 | Not Specified | 0.00e+00 |
| | | panda_joint3 | 2 | 0.00e+00 | Not Specified | 0.00e+00 |
| | | panda_joint4 | 3 | 0.00e+00 | Not Specified | 0.00e+00 |
| panda_forearm | joint_velocity_limit | panda_joint5 | 4 | 2.61e+00 | Not Specified | 2.61e+00 |
| | | panda_joint6 | 5 | 2.61e+00 | Not Specified | 2.61e+00 |
| | | panda_joint7 | 6 | 2.61e+00 | Not Specified | 2.61e+00 |
| | stiffness | panda_joint5 | 4 | 2.29e+04 | 8.00e+01 | 8.00e+01 |
| | | panda_joint6 | 5 | 2.29e+04 | 8.00e+01 | 8.00e+01 |
| | | panda_joint7 | 6 | 2.29e+04 | 8.00e+01 | 8.00e+01 |
| | damping | panda_joint5 | 4 | 4.58e+03 | 4.00e+00 | 4.00e+00 |
| | | panda_joint6 | 5 | 4.58e+03 | 4.00e+00 | 4.00e+00 |
| | | panda_joint7 | 6 | 4.58e+03 | 4.00e+00 | 4.00e+00 |
| | armature | panda_joint5 | 4 | 0.00e+00 | Not Specified | 0.00e+00 |
| | | panda_joint6 | 5 | 0.00e+00 | Not Specified | 0.00e+00 |
| | | panda_joint7 | 6 | 0.00e+00 | Not Specified | 0.00e+00 |
| | friction | panda_joint5 | 4 | 0.00e+00 | Not Specified | 0.00e+00 |
| | | panda_joint6 | 5 | 0.00e+00 | Not Specified | 0.00e+00 |
| | | panda_joint7 | 6 | 0.00e+00 | Not Specified | 0.00e+00 |
| panda_hand | joint_velocity_limit | panda_finger_joint1 | 7 | 2.00e-01 | Not Specified | 2.00e-01 |
| | | panda_finger_joint2 | 8 | 2.00e-01 | Not Specified | 2.00e-01 |
| | stiffness | panda_finger_joint1 | 7 | 1.00e+06 | 2.00e+03 | 2.00e+03 |
| | | panda_finger_joint2 | 8 | 1.00e+06 | 2.00e+03 | 2.00e+03 |
| | armature | panda_finger_joint1 | 7 | 0.00e+00 | Not Specified | 0.00e+00 |
| | | panda_finger_joint2 | 8 | 0.00e+00 | Not Specified | 0.00e+00 |
| | friction | panda_finger_joint1 | 7 | 0.00e+00 | Not Specified | 0.00e+00 |
| | | panda_finger_joint2 | 8 | 0.00e+00 | Not Specified | 0.00e+00 |
+----------------+------------------------+---------------------+----+-------------+--------------------+----------+
To keep the cleaniness of logging, actuator_value_resolution_debug_print
default to False, remember to turn it on when wishes.
Example: configure and run two robots#
The runnable example scripts/tutorials/01_assets/add_new_robot.py contrasts a minimal
Jetbot configuration with a more detailed Dofbot configuration. Start with an imported USD
asset (see Importing a New Asset) and define its spawn properties and actuators. Jetbot
retains the joint gains authored in the USD by setting stiffness and damping to None.
Both fields must be specified, even when using these USD defaults:
JETBOT_CONFIG = ArticulationCfg(
spawn=sim_utils.UsdFileCfg(usd_path=f"{ISAAC_NUCLEUS_DIR}/Robots/NVIDIA/Jetbot/jetbot.usd"),
actuators={"wheel_acts": ImplicitActuatorCfg(joint_names_expr=[".*"], damping=None, stiffness=None)},
)
Dofbot additionally sets initial joint positions, groups joints by name, and specifies
actuator gains and limits. Its solver iterations and maximum depenetration velocity are
PhysX-specific; use Choosing shared and backend-specific settings when adapting these properties to Newton.
The keys in init_state.joint_pos identify USD joints, not actuator groups. Joint names can
be matched with regular expressions; for example, .* selects all joints.
Expanded Dofbot configuration from the runnable example
DOFBOT_CONFIG = ArticulationCfg(
spawn=sim_utils.UsdFileCfg(
usd_path=f"{ISAAC_NUCLEUS_DIR}/Robots/Yahboom/Dofbot/dofbot.usd",
rigid_props=PhysxRigidBodyCfg(
disable_gravity=False,
max_depenetration_velocity=5.0,
),
articulation_props=[
PhysxArticulationCfg(
enabled_self_collisions=True, solver_position_iteration_count=8, solver_velocity_iteration_count=0
),
NewtonArticulationCfg(self_collision_enabled=True),
],
),
init_state=ArticulationCfg.InitialStateCfg(
joint_pos={
"joint1": 0.0,
"joint2": 0.0,
"joint3": 0.0,
"joint4": 0.0,
},
pos=(0.25, -0.25, 0.0),
),
actuators={
"front_joints": ImplicitActuatorCfg(
joint_names_expr=["joint[1-2]"],
joint_effort_limit=100.0,
joint_velocity_limit=100.0,
stiffness=10000.0,
damping=100.0,
),
"joint3_act": ImplicitActuatorCfg(
joint_names_expr=["joint3"],
joint_effort_limit=100.0,
joint_velocity_limit=100.0,
stiffness=10000.0,
damping=100.0,
),
"joint4_act": ImplicitActuatorCfg(
joint_names_expr=["joint4"],
joint_effort_limit=100.0,
joint_velocity_limit=100.0,
stiffness=10000.0,
damping=100.0,
),
},
)
The example adds both configurations to an InteractiveSceneCfg, assigns each robot a
path under every environment, and constructs the scene. Its loop resets root and joint
states, sets joint targets, writes commands, steps physics, and updates the scene buffers.
See Using the Interactive Scene for scene construction and
Interacting with an articulation for the reset and control loop.
Complete runnable example
1# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
2# All rights reserved.
3#
4# SPDX-License-Identifier: BSD-3-Clause
5
6import argparse
7from typing import TYPE_CHECKING
8
9from isaaclab.app import add_launcher_args, launch_simulation
10from isaaclab.utils import instantiate, replace
11
12# add argparse arguments
13parser = argparse.ArgumentParser(
14 description="This script demonstrates adding a custom robot to an Isaac Lab environment."
15)
16parser.add_argument("--num_envs", type=int, default=1, help="Number of environments to spawn.")
17# append simulation launcher cli args
18add_launcher_args(parser)
19# parse the arguments
20args_cli = parser.parse_args()
21
22import numpy as np
23import torch
24from isaaclab_newton.sim.schemas import NewtonArticulationCfg
25from isaaclab_physx.sim.schemas import PhysxArticulationCfg, PhysxRigidBodyCfg
26
27import isaaclab.sim as sim_utils
28from isaaclab.actuators import ImplicitActuatorCfg
29from isaaclab.assets import AssetBaseCfg
30from isaaclab.assets.articulation import ArticulationCfg
31from isaaclab.scene import InteractiveSceneCfg
32from isaaclab.utils.assets import ISAAC_NUCLEUS_DIR
33
34if TYPE_CHECKING:
35 from isaaclab.scene import InteractiveScene
36
37JETBOT_CONFIG = ArticulationCfg(
38 spawn=sim_utils.UsdFileCfg(usd_path=f"{ISAAC_NUCLEUS_DIR}/Robots/NVIDIA/Jetbot/jetbot.usd"),
39 actuators={"wheel_acts": ImplicitActuatorCfg(joint_names_expr=[".*"], damping=None, stiffness=None)},
40)
41
42DOFBOT_CONFIG = ArticulationCfg(
43 spawn=sim_utils.UsdFileCfg(
44 usd_path=f"{ISAAC_NUCLEUS_DIR}/Robots/Yahboom/Dofbot/dofbot.usd",
45 rigid_props=PhysxRigidBodyCfg(
46 disable_gravity=False,
47 max_depenetration_velocity=5.0,
48 ),
49 articulation_props=[
50 PhysxArticulationCfg(
51 enabled_self_collisions=True, solver_position_iteration_count=8, solver_velocity_iteration_count=0
52 ),
53 NewtonArticulationCfg(self_collision_enabled=True),
54 ],
55 ),
56 init_state=ArticulationCfg.InitialStateCfg(
57 joint_pos={
58 "joint1": 0.0,
59 "joint2": 0.0,
60 "joint3": 0.0,
61 "joint4": 0.0,
62 },
63 pos=(0.25, -0.25, 0.0),
64 ),
65 actuators={
66 "front_joints": ImplicitActuatorCfg(
67 joint_names_expr=["joint[1-2]"],
68 joint_effort_limit=100.0,
69 joint_velocity_limit=100.0,
70 stiffness=10000.0,
71 damping=100.0,
72 ),
73 "joint3_act": ImplicitActuatorCfg(
74 joint_names_expr=["joint3"],
75 joint_effort_limit=100.0,
76 joint_velocity_limit=100.0,
77 stiffness=10000.0,
78 damping=100.0,
79 ),
80 "joint4_act": ImplicitActuatorCfg(
81 joint_names_expr=["joint4"],
82 joint_effort_limit=100.0,
83 joint_velocity_limit=100.0,
84 stiffness=10000.0,
85 damping=100.0,
86 ),
87 },
88)
89
90
91class NewRobotsSceneCfg(InteractiveSceneCfg):
92 """Designs the scene."""
93
94 # Ground-plane
95 ground = AssetBaseCfg(prim_path="/World/defaultGroundPlane", spawn=sim_utils.GroundPlaneCfg())
96
97 # lights
98 dome_light = AssetBaseCfg(
99 prim_path="/World/Light", spawn=sim_utils.DomeLightCfg(intensity=3000.0, color=(0.75, 0.75, 0.75))
100 )
101
102 # robot
103 Jetbot = replace(JETBOT_CONFIG, prim_path="{ENV_REGEX_NS}/Jetbot")
104 Dofbot = replace(DOFBOT_CONFIG, prim_path="{ENV_REGEX_NS}/Dofbot")
105
106
107def run_simulator(sim: sim_utils.SimulationContext, scene: "InteractiveScene"):
108 sim_dt = sim.get_physics_dt()
109 sim_time = 0.0
110 count = 0
111
112 # wheel-velocity templates allocated once on the simulation device; the joint
113 # target setters dispatch to GPU Warp kernels and reject CPU tensors.
114 straight_action = torch.tensor([[10.0, 10.0]], device=sim.device).repeat(scene.num_envs, 1)
115 turn_action = torch.tensor([[5.0, -5.0]], device=sim.device).repeat(scene.num_envs, 1)
116
117 while sim.is_running():
118 # reset
119 if count % 500 == 0:
120 # reset counters
121 count = 0
122 # reset the scene entities to their initial positions offset by the environment origins
123 root_jetbot_pose = scene["Jetbot"].data.default_root_pose.torch.clone()
124 root_jetbot_pose[:, :3] += scene.env_origins
125 root_dofbot_pose = scene["Dofbot"].data.default_root_pose.torch.clone()
126 root_dofbot_pose[:, :3] += scene.env_origins
127
128 # copy the default root state to the sim for the jetbot's orientation and velocity
129 scene["Jetbot"].write_root_pose_to_sim_index(root_pose=root_jetbot_pose)
130 root_jetbot_vel = scene["Jetbot"].data.default_root_vel.torch.clone()
131 scene["Jetbot"].write_root_velocity_to_sim_index(root_velocity=root_jetbot_vel)
132 scene["Dofbot"].write_root_pose_to_sim_index(root_pose=root_dofbot_pose)
133 root_dofbot_vel = scene["Dofbot"].data.default_root_vel.torch.clone()
134 scene["Dofbot"].write_root_velocity_to_sim_index(root_velocity=root_dofbot_vel)
135
136 # copy the default joint states to the sim
137 joint_pos, joint_vel = (
138 scene["Jetbot"].data.default_joint_pos.torch.clone(),
139 scene["Jetbot"].data.default_joint_vel.torch.clone(),
140 )
141 scene["Jetbot"].write_joint_position_to_sim_index(position=joint_pos)
142 scene["Jetbot"].write_joint_velocity_to_sim_index(velocity=joint_vel)
143 joint_pos, joint_vel = (
144 scene["Dofbot"].data.default_joint_pos.torch.clone(),
145 scene["Dofbot"].data.default_joint_vel.torch.clone(),
146 )
147 scene["Dofbot"].write_joint_position_to_sim_index(position=joint_pos)
148 scene["Dofbot"].write_joint_velocity_to_sim_index(velocity=joint_vel)
149 # clear internal buffers
150 scene.reset()
151 print("[INFO]: Resetting Jetbot and Dofbot state...")
152
153 # drive around
154 if count % 100 < 75:
155 # Drive straight by setting equal wheel velocities
156 action = straight_action
157 else:
158 # Turn by applying different velocities
159 action = turn_action
160
161 scene["Jetbot"].set_joint_velocity_target_index(target=action)
162
163 # wave
164 wave_action = scene["Dofbot"].data.default_joint_pos.torch.clone()
165 wave_action[:, 0:4] = 0.25 * np.sin(2 * np.pi * 0.5 * sim_time)
166 scene["Dofbot"].set_joint_position_target_index(target=wave_action)
167
168 scene.write_data_to_sim()
169 sim.step()
170 sim_time += sim_dt
171 count += 1
172 scene.update(sim_dt)
173
174
175def main():
176 """Main function."""
177 # Configure the simulation
178 sim_cfg = sim_utils.SimulationCfg(device=args_cli.device)
179 # Launch the simulator runtime that the configuration needs
180 with launch_simulation(sim_cfg, args_cli):
181 # Initialize the simulation context
182 sim = sim_utils.SimulationContext(sim_cfg)
183 sim.set_camera_view([3.5, 0.0, 3.2], [0.0, 0.0, 0.5])
184 # Design scene
185 scene_cfg = NewRobotsSceneCfg(num_envs=args_cli.num_envs, env_spacing=2.0)
186 scene = instantiate(scene_cfg)
187 # Play the simulator
188 sim.reset()
189 # Now we are ready!
190 print("[INFO]: Setup complete...")
191 # Run the simulator
192 run_simulator(sim, scene)
193
194
195if __name__ == "__main__":
196 main()
Run the example in the Isaac Sim viewport:
uv run isaaclab -p scripts/tutorials/01_assets/add_new_robot.py --viz kit
This example uses PhysX physics and requires Isaac Sim. The Dofbot gripper is not actuated
in this example, so a warning about unconfigured joints is expected. Stop the example with Ctrl+C.