ActionSpace is an abstract base class that defines the interface for converting between trajectories and action spaces. All action space implementations must inherit from this class and implement its abstract methods.
Class Definition
torch.nn.Module and ABC (Abstract Base Class).
Abstract Methods
traj_to_action
Transforms a future trajectory into the action space representation.Historical trajectory positions with shape
(..., T, 3)Historical trajectory rotations with shape
(..., T, 3, 3)Future trajectory positions with shape
(..., T, 3)Future trajectory rotations with shape
(..., T, 3, 3)Additional positional arguments for specific action space implementations
Additional keyword arguments for specific action space implementations
torch.Tensor with shape (..., *action_space_dims) representing the action in the action space
action_to_traj
Transforms an action into trajectory representation.Action tensor with shape
(..., *action_space_dims)Historical trajectory positions with shape
(..., T, 3)Historical trajectory rotations with shape
(..., T, 3, 3)Additional positional arguments for specific action space implementations
Additional keyword arguments for specific action space implementations
(traj_future_xyz, traj_future_rot) where:
traj_future_xyzhas shape(..., T, 3)traj_future_rothas shape(..., T, 3, 3)
get_action_space_dims
Returns the dimensions of the action space.tuple[int, ...] representing the action space dimensions
Methods
is_within_bounds
Checks if an action is within valid bounds. The default implementation assumes all actions are valid.Action tensor with shape
(..., *action_space_dims)torch.Tensor with shape (...) containing boolean values indicating whether each action is within bounds
The default implementation returns
True for all actions. Subclasses should override this method to implement specific boundary checking logic.