Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds clip range for JointAction #1476

Merged
merged 9 commits into from
Dec 15, 2024
Merged
Prev Previous commit
Next Next commit
fix: del debug print
  • Loading branch information
fan-ziqi committed Dec 7, 2024
commit 7f983855f1a55db0cad9ef52bc94cfe378cbdf91
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ def process_actions(self, actions: torch.Tensor):
index_list, _, value_list = string_utils.resolve_matching_names_values(self._clip, self._joint_names)
for index in range(len(index_list)):
min_value, max_value = value_list[index]
print(value_list[index])
self._processed_actions[:, index_list[index]].clip_(min_value, max_value)

def reset(self, env_ids: Sequence[int] | None = None) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,7 @@ class CommandsCfg:
class ActionsCfg:
"""Action specifications for the MDP."""

joint_pos = mdp.JointPositionActionCfg(
asset_name="robot",
joint_names=[".*"],
scale=0.5,
use_default_offset=True,
clip={".*": (-100.0, 100.0)}, # only for test
)
joint_pos = mdp.JointPositionActionCfg(asset_name="robot", joint_names=[".*"], scale=0.5, use_default_offset=True)


@configclass
Expand Down