Openvla Agent
OpenVlaAgent
Bases: MotorAgent
OpenVLA agent to generate robot actions.
Specify gradio server endpoint in model_src to make inference via API. See openvla_example_server.py for the an exmaple of the gradio server code.
actor
is a gradio server taking: image, instruction, and unnorm_key as input.
Examples:
>>> openvla_agent = OpenVlaAgent(model_src="https://api.mbodi.ai/community-models/")
>>> openvla.act("move hand forward", Image(size=(224, 224)))
HandControl(pose=Pose6D(x=1,y=2,z=3,roll=0,pitch=0,yaw=0), grasp=JointControl(value=0))
Source code in mbodied/agents/motion/openvla_agent.py
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 |
|
act(instruction, image, unnorm_key='bridge_orig')
Act based on the instruction and image using the remote server.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instruction
|
str
|
The instruction to act on. |
required |
image
|
Image
|
The image to act on. |
required |
unnorm_key
|
str
|
The key for the unnormalized image. |
'bridge_orig'
|
Returns:
Name | Type | Description |
---|---|---|
Motion |
Motion
|
The HandControl generated by the agent. |
Source code in mbodied/agents/motion/openvla_agent.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|