Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions isaac_sim/policies/m20.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
)
WHEEL_ACTION_SCALE = 5.0 # env.yaml joint_vel action scale

ZERO_CMD_EPS = 1e-3


class M20VelocityPolicy(PolicyController):
"""DeepRobotics M20 wheeled quadruped running a velocity-tracking policy."""
Expand Down Expand Up @@ -205,6 +207,9 @@ def forward(self, dt: float, command: np.ndarray) -> None:
vel_cmd = np.zeros(len(pos_cmd), dtype=np.float32)
vel_cmd[self._wheel_ids] = self._wheel_vel_target

if float(np.abs(command).max()) < ZERO_CMD_EPS:
vel_cmd[self._wheel_ids] = 0.0

self.robot.apply_action(
ArticulationAction(joint_positions=pos_cmd, joint_velocities=vel_cmd)
)
Expand Down
Loading