Skip to content

Commit

Permalink
openvla policy intergration pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
DelinQu committed Jul 6, 2024
1 parent 8c0a23d commit e95842c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions simpler_env/main_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from simpler_env.evaluation.maniskill2_evaluator import maniskill2_evaluator
from simpler_env.policies.octo.octo_server_model import OctoServerInference
from simpler_env.policies.rt1.rt1_model import RT1Inference
from simpler_env.policies.openvla.openvla_model import OpenVALInference
from simpler_env.policies.openvla.openvla_model import OpenVLAInference

try:
from simpler_env.policies.octo.octo_model import OctoInference
Expand Down Expand Up @@ -56,7 +56,7 @@
)
elif args.policy_model == "openvla":
assert args.ckpt_path is not None
model = OpenVALInference(
model = OpenVLAInference(
saved_model_path=args.ckpt_path,
policy_setup=args.policy_setup,
action_scale=args.action_scale,
Expand Down
4 changes: 2 additions & 2 deletions simpler_env/policies/openvla/openvla_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import cv2 as cv


class OpenVALInference:
class OpenVLAInference:
def __init__(
self,
saved_model_path: str = "openvla/openvla-7b",
Expand Down Expand Up @@ -144,7 +144,7 @@ def step(
relative_gripper_action = self.previous_gripper_action - current_gripper_action
self.previous_gripper_action = current_gripper_action

if np.abs(relative_gripper_action) > 0.5 and self.sticky_action_is_on is False:
if np.abs(relative_gripper_action) > 0.5 and (not self.sticky_action_is_on):
self.sticky_action_is_on = True
self.sticky_gripper_action = relative_gripper_action

Expand Down

0 comments on commit e95842c

Please sign in to comment.