File size: 1,475 Bytes
700dd75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
from abc import abstractmethod

from decoupled_wbc.control.base.env import Env
from decoupled_wbc.control.base.sensor import Sensor
from decoupled_wbc.control.robot_model.robot_model import RobotModel


class Hands:
    """Container class for left and right hand environments.

    Attributes:
        left: Environment for the left hand
        right: Environment for the right hand
    """

    left: Env
    right: Env


class HumanoidEnv(Env):
    """Base class for humanoid robot environments.

    This class provides the interface for accessing the robot's body, hands, and sensors.
    """

    def body(self) -> Env:
        """Get the robot's body environment.

        Returns:
            Env: The body environment
        """
        pass

    def hands(self) -> Hands:
        """Get the robot's hands.

        Returns:
            Hands: Container with left and right hand environments
        """
        pass

    def sensors(self) -> dict[str, Sensor]:
        """Get the sensors of this environment

        Returns:
            dict: A dictionary of sensors
        """
        pass

    @abstractmethod
    def robot_model(self) -> RobotModel:
        """Get the robot model of this environment
        This robot model is used to dispatch whole body actions to body
        and hand actuators and to reconstruct proprioceptive
        observations from body and hands.

        Returns:
            RobotModel: The robot model
        """
        pass