Download GR00T-WholeBodyControl/decoupled_wbc/control/base/sensor.py from Timsty/groot_deployment: direct link, hf CLI and curl.
- Browser
- Download file 1.1 kB
-
https://huggingface.co/Timsty/groot_deployment/resolve/main/GR00T-WholeBodyControl/decoupled_wbc/control/base/sensor.py
- Command line
-
hf download hf://Timsty/groot_deployment/GR00T-WholeBodyControl/decoupled_wbc/control/base/sensor.py
-
curl -L -o sensor.py https://huggingface.co/Timsty/groot_deployment/resolve/main/GR00T-WholeBodyControl/decoupled_wbc/control/base/sensor.py
1.1 kB
| import gymnasium as gym | |
| class Sensor: | |
| """Base class for implementing sensors in the Gr00t framework. | |
| A Sensor provides information about a specific sensor on the robot (e.g. camera, IMU, | |
| force sensor). This abstract base class defines the interface that all concrete sensor | |
| implementations must follow. | |
| """ | |
| def read(self, **kwargs) -> any: | |
| """Read the current sensor value. | |
| Args: | |
| **kwargs: Additional parameters specific to the sensor implementation | |
| (e.g. camera resolution, sampling rate) | |
| Returns: | |
| The sensor reading value (e.g. image data, acceleration measurements) | |
| """ | |
| pass | |
| def observation_space(self) -> gym.Space: | |
| """Get the observation space of this sensor. | |
| Returns: | |
| gym.Space: The observation space defining the shape and bounds of sensor readings | |
| (e.g. image dimensions for camera, measurement ranges for IMU) | |
| """ | |
| pass | |
| def close(self): | |
| """Clean up any resources used by the sensor.""" | |
| pass | |