upkie 6.1.0
Open-source wheeled biped robots
|
At each step, with a given probability, apply a random push to the robot. More...
Public Member Functions | |
def | __init__ (self, env, push_prob=0.01, push_generator=lambda:np.random.normal(0, 400, 3)) |
Initialize wrapper. More... | |
def | get_spine_action (self, action) |
Public Attributes | |
env | |
Wrapped environment. | |
push_prob | |
Probability of pushing at each step. | |
push_generator | |
Function that generates the push force. More... | |
At each step, with a given probability, apply a random push to the robot.
def upkie.envs.wrappers.random_push.RandomPush.__init__ | ( | self, | |
env, | |||
push_prob = 0.01 , |
|||
push_generator = lambda: np.random.normal(0, 400, 3) |
|||
) |
Initialize wrapper.
env | Environment to wrap. |
push_prob | Probability of pushing at each step. |
push_generator | Function that generates the push force. It should return a 3D numpy array. |
def upkie.envs.wrappers.random_push.RandomPush.get_spine_action | ( | self, | |
action | |||
) |
Adds a random push to the action.
upkie.envs.wrappers.random_push.RandomPush.push_generator |
Function that generates the push force.
It should return a 3D numpy array.