Robot state (configuration and velocity) with optional randomization.
More...
|
def | __init__ (self, Optional[np.ndarray] angular_velocity_base_in_base=None, Optional[np.ndarray] joint_configuration=None, Optional[np.ndarray] joint_velocity=None, Optional[np.ndarray] linear_velocity_base_to_world_in_world=None, Optional[ScipyRotation] orientation_base_in_world=None, Optional[np.ndarray] position_base_in_world=None, Optional[RobotStateRandomization] randomization=None) |
| Initialize a new state. More...
|
|
np.ndarray | sample_angular_velocity (self, np.random.Generator np_random) |
| Sample an angular velocity around the one in this state. More...
|
|
np.ndarray | sample_linear_velocity (self, np.random.Generator np_random) |
| Sample a linear velocity around the one in this state. More...
|
|
ScipyRotation | sample_orientation (self, np.random.Generator np_random) |
| Sample an orientation around the one in this state. More...
|
|
np.ndarray | sample_position (self, np.random.Generator np_random) |
| Sample a position around the one in this state. More...
|
|
|
| angular_velocity_base_in_base |
| Angular velocity of the base in body coordinates, in rad/s.
|
|
| joint_configuration |
| Vector of joint angles in radians.
|
|
| joint_velocity |
| Vector of joint velocities, in rad/s.
|
|
| linear_velocity_base_to_world_in_world |
| Linear velocity of the base in world coordinates, in m/s.
|
|
| orientation_base_in_world |
| Orientation of the base frame with respect to the world frame.
|
|
| position_base_in_world |
| Position of the base frame in the world frame.
|
|
| randomization |
| Displacements and velocities added to the state when calling one of the sampling functions.
|
|
Robot state (configuration and velocity) with optional randomization.
◆ __init__()
def upkie.utils.robot_state.RobotState.__init__ |
( |
|
self, |
|
|
Optional[np.ndarray] |
angular_velocity_base_in_base = None , |
|
|
Optional[np.ndarray] |
joint_configuration = None , |
|
|
Optional[np.ndarray] |
joint_velocity = None , |
|
|
Optional[np.ndarray] |
linear_velocity_base_to_world_in_world = None , |
|
|
Optional[ScipyRotation] |
orientation_base_in_world = None , |
|
|
Optional[np.ndarray] |
position_base_in_world = None , |
|
|
Optional[RobotStateRandomization] |
randomization = None |
|
) |
| |
Initialize a new state.
- Parameters
-
[in] | angular_velocity_base_in_base | Body angular velocity of the floating-base link. |
[in] | joint_configuration | Joint configuration vector (not including the floating-base joint). |
[in] | joint_velocity | Joint velocity vector (not including the floating-base joint). |
[in] | linear_velocity_base_to_world_in_world | Linear velocity of the floating-base link in the world frame. |
[in] | orientation_base_in_world | Rotation from the floating-base frame to the world frame. |
[in] | position_base_in_world | Position of the floating-base frame in the world frame. |
[in] | randomization | Optional state randomization distribution. |
◆ sample_angular_velocity()
np.ndarray upkie.utils.robot_state.RobotState.sample_angular_velocity |
( |
|
self, |
|
|
np.random.Generator
|
np_random |
|
) |
| |
Sample an angular velocity around the one in this state.
- Parameters
-
[in] | np_random | NumPy random number generator. |
- Returns
- Sampled angular velocity.
◆ sample_linear_velocity()
np.ndarray upkie.utils.robot_state.RobotState.sample_linear_velocity |
( |
|
self, |
|
|
np.random.Generator
|
np_random |
|
) |
| |
Sample a linear velocity around the one in this state.
- Parameters
-
[in] | np_random | NumPy random number generator. |
- Returns
- Sampled linear velocity.
◆ sample_orientation()
ScipyRotation upkie.utils.robot_state.RobotState.sample_orientation |
( |
|
self, |
|
|
np.random.Generator
|
np_random |
|
) |
| |
Sample an orientation around the one in this state.
- Parameters
-
[in] | np_random | NumPy random number generator. |
- Returns
- Sampled orientation.
◆ sample_position()
np.ndarray upkie.utils.robot_state.RobotState.sample_position |
( |
|
self, |
|
|
np.random.Generator |
np_random |
|
) |
| |
Sample a position around the one in this state.
- Parameters
-
[in] | np_random | NumPy random number generator. |
- Returns
- Randomized position.
The documentation for this class was generated from the following file:
- upkie/utils/robot_state.py