diff --git a/scripts/tutorials/01_assets/add_new_robot.py b/scripts/tutorials/01_assets/add_new_robot.py index 7afd19a77bc0..ca0c477ef587 100644 --- a/scripts/tutorials/01_assets/add_new_robot.py +++ b/scripts/tutorials/01_assets/add_new_robot.py @@ -105,8 +105,8 @@ def run_simulator(sim: sim_utils.SimulationContext, scene: InteractiveScene): # wheel-velocity templates allocated once on the simulation device; the joint # target setters dispatch to GPU Warp kernels and reject CPU tensors. - straight_action = torch.tensor([[10.0, 10.0]], device=sim.device) - turn_action = torch.tensor([[5.0, -5.0]], device=sim.device) + straight_action = torch.tensor([[10.0, 10.0]], device=sim.device).repeat(scene.num_envs, 1) + turn_action = torch.tensor([[5.0, -5.0]], device=sim.device).repeat(scene.num_envs, 1) while simulation_app.is_running(): # reset @@ -173,7 +173,7 @@ def main(): sim = sim_utils.SimulationContext(sim_cfg) sim.set_camera_view([3.5, 0.0, 3.2], [0.0, 0.0, 0.5]) # Design scene - scene_cfg = NewRobotsSceneCfg(args_cli.num_envs, env_spacing=2.0) + scene_cfg = NewRobotsSceneCfg(num_envs=args_cli.num_envs, env_spacing=2.0) scene = InteractiveScene(scene_cfg) # Play the simulator sim.reset()