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
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ def _parse_joint_parameter(
# note: need to specify type to be safe (e.g. values are ints, but we want floats)
param[:, indices] = torch.tensor(values, dtype=torch.float, device=self._device)
else:
raise TypeError(f"Invalid type for parameter value: {type(cfg_value)}. Expected float or dict.")
raise TypeError(
f"Invalid type for parameter value: {type(cfg_value)} for "
+ f"actuator on joints {self.joint_names}. Expected float or dict."
)
elif default_value is not None:
if isinstance(default_value, (float, int)):
# if float, then use the same value for all joints
Expand All @@ -230,7 +233,10 @@ def _parse_joint_parameter(
# if tensor, then use the same tensor for all joints
param[:] = default_value.float()
else:
raise TypeError(f"Invalid type for default value: {type(default_value)}. Expected float or Tensor.")
raise TypeError(
f"Invalid type for default value: {type(default_value)} for "
+ f"actuator on joints {self.joint_names}. Expected float or Tensor."
)
else:
raise ValueError("The parameter value is None and no default value is provided.")

Expand Down
Loading