def android_example():
    """A basic example of how to use the android agent."""
    env = holodeck.make("AndroidPlayground")

    # The Android's command is a 94 length vector representing torques to be applied at each of his joints
    command = np.ones(94) * 10
    for i in range(10):
        env.reset()
        for j in range(1000):
            if j % 50 == 0:
                command *= -1

            state, reward, terminal, _ = env.step(command)

            # To access specific sensor data:
            pixels = state[Sensors.PIXEL_CAMERA]
            orientation = state[Sensors.ORIENTATION_SENSOR]
def android_example ( ) : env = holodeck . make ( "AndroidPlayground" ) command = np . ones ( 94 ) * 10 for i in range ( 10 ) : env . reset ( ) for j in range ( 1000 ) : if j % 50 == 0 : command *= - 1 state , reward , terminal , _ = env . step ( command ) pixels = state [ Sensors . PIXEL_CAMERA ] orientation = state [ Sensors . ORIENTATION_SENSOR ]
A basic example of how to use the android agent.