Skip to content

Commit

Permalink
Add the Spot locomotion example
Browse files Browse the repository at this point in the history
  • Loading branch information
farbod-farshidian committed Jun 3, 2024
1 parent 3ad18a8 commit 7772672
Show file tree
Hide file tree
Showing 22 changed files with 1,495 additions and 38 deletions.
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@
html_theme_options = {
"collapse_navigation": True,
"repository_url": "https://github.com/isaac-sim/IsaacLab",
"announcement": "We have now released v0.3.0! Please use the latest version for the best experience.",
"use_repository_button": True,
"use_issues_button": True,
"use_edit_page_button": True,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 38 additions & 33 deletions docs/source/features/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -111,39 +111,41 @@ Environments based on legged locomotion tasks.
.. table::
:widths: 33 37 30

+------------------------------+----------------------------------------------+-------------------------------------------------------------------------+
| World | Environment ID | Description |
+==============================+==============================================+=========================================================================+
| |velocity-flat-anymal-b| | |velocity-flat-anymal-b-link| | Track a velocity command on flat terrain with the Anymal B robot |
+------------------------------+----------------------------------------------+-------------------------------------------------------------------------+
| |velocity-rough-anymal-b| | |velocity-rough-anymal-b-link| | Track a velocity command on rough terrain with the Anymal B robot |
+------------------------------+----------------------------------------------+-------------------------------------------------------------------------+
| |velocity-flat-anymal-c| | | |velocity-flat-anymal-c-link| | Track a velocity command on flat terrain with the Anymal C robot |
| | | |velocity-flat-anymal-c-direct-link| | |
+------------------------------+----------------------------------------------+-------------------------------------------------------------------------+
| |velocity-rough-anymal-c| | | |velocity-rough-anymal-c-link| | Track a velocity command on rough terrain with the Anymal C robot |
| | | |velocity-rough-anymal-c-direct-link| | |
+------------------------------+----------------------------------------------+-------------------------------------------------------------------------+
| |velocity-flat-anymal-d| | |velocity-flat-anymal-d-link| | Track a velocity command on flat terrain with the Anymal D robot |
+------------------------------+----------------------------------------------+-------------------------------------------------------------------------+
| |velocity-rough-anymal-d| | |velocity-rough-anymal-d-link| | Track a velocity command on rough terrain with the Anymal D robot |
+------------------------------+----------------------------------------------+-------------------------------------------------------------------------+
| |velocity-flat-unitree-a1| | |velocity-flat-unitree-a1-link| | Track a velocity command on flat terrain with the Unitree A1 robot |
+------------------------------+----------------------------------------------+-------------------------------------------------------------------------+
| |velocity-rough-unitree-a1| | |velocity-rough-unitree-a1-link| | Track a velocity command on rough terrain with the Unitree A1 robot |
+------------------------------+----------------------------------------------+-------------------------------------------------------------------------+
| |velocity-flat-unitree-go1| | |velocity-flat-unitree-go1-link| | Track a velocity command on flat terrain with the Unitree Go1 robot |
+------------------------------+----------------------------------------------+-------------------------------------------------------------------------+
| |velocity-rough-unitree-go1| | |velocity-rough-unitree-go1-link| | Track a velocity command on rough terrain with the Unitree Go1 robot |
+------------------------------+----------------------------------------------+-------------------------------------------------------------------------+
| |velocity-flat-unitree-go2| | |velocity-flat-unitree-go2-link| | Track a velocity command on flat terrain with the Unitree Go2 robot |
+------------------------------+----------------------------------------------+-------------------------------------------------------------------------+
| |velocity-rough-unitree-go2| | |velocity-rough-unitree-go2-link| | Track a velocity command on rough terrain with the Unitree Go2 robot |
+------------------------------+----------------------------------------------+-------------------------------------------------------------------------+
| |velocity-flat-h1| | |velocity-flat-h1-link| | Track a velocity command on flat terrain with the Unitree H1 robot |
+------------------------------+----------------------------------------------+-------------------------------------------------------------------------+
| |velocity-rough-h1| | |velocity-rough-h1-link| | Track a velocity command on rough terrain with the Unitree H1 robot |
+------------------------------+----------------------------------------------+-------------------------------------------------------------------------+
+------------------------------+----------------------------------------------+------------------------------------------------------------------------------+
| World | Environment ID | Description |
+==============================+==============================================+==============================================================================+
| |velocity-flat-anymal-b| | |velocity-flat-anymal-b-link| | Track a velocity command on flat terrain with the Anymal B robot |
+------------------------------+----------------------------------------------+------------------------------------------------------------------------------+
| |velocity-rough-anymal-b| | |velocity-rough-anymal-b-link| | Track a velocity command on rough terrain with the Anymal B robot |
+------------------------------+----------------------------------------------+------------------------------------------------------------------------------+
| |velocity-flat-anymal-c| | | |velocity-flat-anymal-c-link| | Track a velocity command on flat terrain with the Anymal C robot |
| | | |velocity-flat-anymal-c-direct-link| | |
+------------------------------+----------------------------------------------+------------------------------------------------------------------------------+
| |velocity-rough-anymal-c| | | |velocity-rough-anymal-c-link| | Track a velocity command on rough terrain with the Anymal C robot |
| | | |velocity-rough-anymal-c-direct-link| | |
+------------------------------+----------------------------------------------+------------------------------------------------------------------------------+
| |velocity-flat-anymal-d| | |velocity-flat-anymal-d-link| | Track a velocity command on flat terrain with the Anymal D robot |
+------------------------------+----------------------------------------------+------------------------------------------------------------------------------+
| |velocity-rough-anymal-d| | |velocity-rough-anymal-d-link| | Track a velocity command on rough terrain with the Anymal D robot |
+------------------------------+----------------------------------------------+------------------------------------------------------------------------------+
| |velocity-flat-unitree-a1| | |velocity-flat-unitree-a1-link| | Track a velocity command on flat terrain with the Unitree A1 robot |
+------------------------------+----------------------------------------------+------------------------------------------------------------------------------+
| |velocity-rough-unitree-a1| | |velocity-rough-unitree-a1-link| | Track a velocity command on rough terrain with the Unitree A1 robot |
+------------------------------+----------------------------------------------+------------------------------------------------------------------------------+
| |velocity-flat-unitree-go1| | |velocity-flat-unitree-go1-link| | Track a velocity command on flat terrain with the Unitree Go1 robot |
+------------------------------+----------------------------------------------+------------------------------------------------------------------------------+
| |velocity-rough-unitree-go1| | |velocity-rough-unitree-go1-link| | Track a velocity command on rough terrain with the Unitree Go1 robot |
+------------------------------+----------------------------------------------+------------------------------------------------------------------------------+
| |velocity-flat-unitree-go2| | |velocity-flat-unitree-go2-link| | Track a velocity command on flat terrain with the Unitree Go2 robot |
+------------------------------+----------------------------------------------+------------------------------------------------------------------------------+
| |velocity-rough-unitree-go2| | |velocity-rough-unitree-go2-link| | Track a velocity command on rough terrain with the Unitree Go2 robot |
+------------------------------+----------------------------------------------+------------------------------------------------------------------------------+
| |velocity-flat-spot| | |velocity-flat-spot-link| | Track a velocity command on flat terrain with the Boston Dynamics Spot robot |
+------------------------------+----------------------------------------------+------------------------------------------------------------------------------+
| |velocity-flat-h1| | |velocity-flat-h1-link| | Track a velocity command on flat terrain with the Unitree H1 robot |
+------------------------------+----------------------------------------------+------------------------------------------------------------------------------+
| |velocity-rough-h1| | |velocity-rough-h1-link| | Track a velocity command on rough terrain with the Unitree H1 robot |
+------------------------------+----------------------------------------------+------------------------------------------------------------------------------+

.. |velocity-flat-anymal-b-link| replace:: `Isaac-Velocity-Flat-Anymal-B-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/manager_based/locomotion/velocity/config/anymal_b/flat_env_cfg.py>`__
.. |velocity-rough-anymal-b-link| replace:: `Isaac-Velocity-Rough-Anymal-B-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/manager_based/locomotion/velocity/config/anymal_b/rough_env_cfg.py>`__
Expand All @@ -166,6 +168,8 @@ Environments based on legged locomotion tasks.
.. |velocity-flat-unitree-go2-link| replace:: `Isaac-Velocity-Flat-Unitree-Go2-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/manager_based/locomotion/velocity/config/unitree_go2/flat_env_cfg.py>`__
.. |velocity-rough-unitree-go2-link| replace:: `Isaac-Velocity-Rough-Unitree-Go2-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/manager_based/locomotion/velocity/config/unitree_go2/rough_env_cfg.py>`__

.. |velocity-flat-spot-link| replace:: `Isaac-Velocity-Flat-Spot-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/manager_based/locomotion/velocity/config/spot/flat_env_cfg.py>`__

.. |velocity-flat-h1-link| replace:: `Isaac-Velocity-Flat-H1-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/manager_based/locomotion/velocity/config/h1/flat_env_cfg.py>`__
.. |velocity-rough-h1-link| replace:: `Isaac-Velocity-Rough-H1-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/manager_based/locomotion/velocity/config/h1/rough_env_cfg.py>`__

Expand All @@ -182,6 +186,7 @@ Environments based on legged locomotion tasks.
.. |velocity-rough-unitree-go1| image:: ../_static/tasks/locomotion/go1_rough.jpg
.. |velocity-flat-unitree-go2| image:: ../_static/tasks/locomotion/go2_flat.jpg
.. |velocity-rough-unitree-go2| image:: ../_static/tasks/locomotion/go2_rough.jpg
.. |velocity-flat-spot| image:: ../_static/tasks/locomotion/spot_flat.jpg
.. |velocity-flat-h1| image:: ../_static/tasks/locomotion/h1_flat.jpg
.. |velocity-rough-h1| image:: ../_static/tasks/locomotion/h1_rough.jpg

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
ActuatorNetLSTMCfg,
ActuatorNetMLPCfg,
DCMotorCfg,
DelayedPDActuatorCfg,
IdealPDActuatorCfg,
ImplicitActuatorCfg,
RemotizedPDActuatorCfg,
)
from .actuator_net import ActuatorNetLSTM, ActuatorNetMLP
from .actuator_pd import DCMotor, IdealPDActuator, ImplicitActuator
from .actuator_pd import DCMotor, DelayedPDActuator, IdealPDActuator, ImplicitActuator, RemotizedPDActuator
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# SPDX-License-Identifier: BSD-3-Clause

import torch
from collections.abc import Iterable
from dataclasses import MISSING
from typing import Literal
Expand Down Expand Up @@ -153,3 +154,42 @@ class ActuatorNetMLPCfg(DCMotorCfg):
The index *0* corresponds to current time-step, while *n* corresponds to n-th
time-step in the past. The allocated history length is `max(input_idx) + 1`.
"""


@configclass
class DelayedPDActuatorCfg(IdealPDActuatorCfg):
"""Configuration for a delayed PD actuator."""

class_type: type = actuator_pd.DelayedPDActuator

min_num_time_lags: int = 0
"""Minimum number of physics time-steps that the actuator command may be delayed."""

max_num_time_lags: int = 0
"""Maximum number of physics time-steps that the actuator command may be delayed."""

num_time_lags: int = 0
"""The number of physics time-steps that the actuator command will be delayed.
Note:
This values cannot be greater than `max_num_time_lags`.
"""


@configclass
class RemotizedPDActuatorCfg(DelayedPDActuatorCfg):
"""Configuration for a remotized PD actuator.
Note:
The torque output limits for this actuator is derived from a linear interpolation of a lookup table
in :attr:`joint_parameter_lookup` describing the relationship between joint angles and the output torques.
"""

class_type: type = actuator_pd.RemotizedPDActuator

joint_parameter_lookup: torch.Tensor = MISSING
"""Joint parameter lookup table. Shape is (num_lookup_points, 3).
The tensor describes relationship between the joint angle (rad), the transmission ratio (in/out),
and the output torque (N*m).
"""
Loading

0 comments on commit 7772672

Please sign in to comment.