visualizers.viser_app.tasks.spot_base
#
Module Contents#
- class visualizers.viser_app.tasks.spot_base.GOAL_POSITIONS#
Goal positions of Spot. .. py:attribute:: origin
- type:
numpy.ndarray
- blue_cross: numpy.ndarray#
- black_cross: numpy.ndarray#
- visualizers.viser_app.tasks.spot_base.DEFAULT_SPOT_ROLLOUT_CUTOFF_TIME = 0.25#
- class visualizers.viser_app.tasks.spot_base.SpotBaseConfig#
Bases:
jacta.visualizers.viser_app.tasks.task.TaskConfig
Base config for spot tasks. .. py:attribute:: default_command
- type:
numpy.ndarray
- fall_penalty: float = 2500.0#
- spot_fallen_threshold = 0.35#
- w_goal: float = 60.0#
- w_proximity: float = 2.0#
- w_controls: float = 0.0#
- cutoff_time: float#
- visualizers.viser_app.tasks.spot_base.ConfigT#
- class visualizers.viser_app.tasks.spot_base.SpotBase(model_filepath: str, policy_filepath: str)#
Bases:
jacta.visualizers.viser_app.tasks.mujoco_task.MujocoTask
[ConfigT
]Base task for spot locomotion.
This is an ‘abstract’ class that should not be instantiated. .. py:property:: dt
- type:
float
Effective timestep for this task – each step is physics_substeps * the mujoco dt.
- Parameters:
model_filepath (str) –
policy_filepath (str) –
- property default_idle_command: numpy.ndarray#
Default idling command. Must be defined.
- Return type:
numpy.ndarray
- sim_step(controls: scipy.interpolate.interp1d | None) None #
Spot policy physics evaluation. Evaluates policy and steps simulation forward.
- Parameters:
controls (Optional[scipy.interpolate.interp1d]) – either a spline to be interpolated or None, which calls a default command
- Return type:
None
- rollout(models: list[mujoco_extensions.policy_rollout.System], states: numpy.ndarray, controls: numpy.ndarray, additional_info: dict[str, Any], output_states: numpy.ndarray, output_sensors: numpy.ndarray) tuple[numpy.ndarray, numpy.ndarray] #
Threaded rollout for spot RL system.
- Parameters:
models (list[mujoco_extensions.policy_rollout.System]) –
states (numpy.ndarray) –
controls (numpy.ndarray) –
additional_info (dict[str, Any]) –
output_states (numpy.ndarray) –
output_sensors (numpy.ndarray) –
- Return type:
tuple[numpy.ndarray, numpy.ndarray]
- make_models(num_models: int) list[mujoco_extensions.policy_rollout.System] #
Allocates systems vector to be used for threaded rollout.
- Parameters:
num_models (int) –
- Return type:
list[mujoco_extensions.policy_rollout.System]