upkie 9.0.0
Open-source wheeled biped robots
Loading...
Searching...
No Matches
RobotStateRandomization Class Reference

Domain randomization parameters for Upkie's state. More...

Public Member Functions

def __init__ (self, float roll=0.0, float pitch=0.0, float x=0.0, float z=0.0, float omega_x=0.0, float omega_y=0.0, Optional[np.ndarray] linear_velocity=None)
 Initialize sampler. More...
 
None update (self, Optional[float] roll=None, Optional[float] pitch=None, Optional[float] x=None, Optional[float] z=None, Optional[float] omega_x=None, Optional[float] omega_y=None, Optional[float] v_x=None, Optional[float] v_z=None)
 Update some fields. More...
 
ScipyRotation sample_orientation (self, np.random.Generator np_random)
 Sample an orientation within the given bounds. More...
 
np.ndarray sample_position (self, np.random.Generator np_random)
 Sample a position within the given bounds. More...
 
np.ndarray sample_angular_velocity (self, np.random.Generator np_random)
 Sample an angular velocity within the given bounds. More...
 
np.ndarray sample_linear_velocity (self, np.random.Generator np_random)
 Sample a linear velocity within the given bounds. More...
 

Public Attributes

 roll
 Amount of roll angle randomization, in radians.
 
 pitch
 Amount of pitch angle randomization, in radians.
 
 x
 Amount of x-axis position randomization, in meters.
 
 z
 Amount of z-axis position randomization, in meters.
 
 omega_x
 Amount of x-axis randomization on the angular-velocity vector, in rad/s.
 
 omega_y
 Amount of y-axis randomization on the angular-velocity vector, in rad/s.
 
 linear_velocity
 Magnitude of linear velocity randomization, as a 3D vector in m/s.
 

Detailed Description

Domain randomization parameters for Upkie's state.

Note
The API for this class is likely to change. Initially all its attributes where floating-point numbers due to a quick-and-dirty design decision.

The documentation for this class was generated from the following file: