Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmytyyang authored and Achuthankrishna committed Sep 17, 2024
1 parent 2e23a8a commit 5985dc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
18 changes: 2 additions & 16 deletions spot_rl_experiments/experiments/skill_test/test_sem_place.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,13 @@
#Open Gripper
spotskillmanager.spot.open_gripper()
input("Place an object in Spot's gripper and press Enter to continue...")
#Place Object and Close Gripper

# Place Object and Close Gripper
rospy.set_param("is_gripper_blocked", 0)
episode_log = {"actions": []} # type: ignore
spotskillmanager.spot.close_gripper()
input("waiting for user to get ready with camera")
# The following is a helpful tip to debug the arm
# We get Spot class
# spot = spotskillmanager.spot
# We can move the gripper to a point with x,y,z and roll, pitch, yaw
# spot.move_gripper_to_point((0.55, 0., 0.26), np.deg2rad(np.array([0,0,0])))
# We can also set the robot arm joints
# config = construct_config()
# spot.set_arm_joint_positions(np.deg2rad(config.INITIAL_ARM_JOINT_ANGLES))

# In addition, if you want to use semantic place skill based on the grasping orientation, you can do
# spotskillmanager.nav("black_case")
# spotskillmanager.pick("bottle")
# # Fetch the arm joint at grasping location
# ee_orientation_at_grasping = spotskillmanager.gaze_controller.env.ee_orientation_at_grasping
# spotskillmanager.nav("test_desk")
# spotskillmanager.place("test_desk", orientation_at_grasping) # This controls the arm initial orientation
spotskillmanager.place(place_target, is_local=is_local, visualize=False)
skill_log = spotskillmanager.place_controller.skill_result_log
if "num_steps" not in skill_log:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Copyright (c) Meta Platforms, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# mypy: ignore-errors
import json
from datetime import datetime

Expand Down Expand Up @@ -30,7 +29,7 @@
spotskillmanager.spot.open_gripper()
input("Place an object in Spot's gripper and press Enter to continue...")
rospy.set_param("is_gripper_blocked", 0)
episode_log = {"actions": []}
episode_log = {"actions": []} # type: ignore
spotskillmanager.spot.close_gripper()
input("waiting for user to get ready with camera")

Expand Down

0 comments on commit 5985dc6

Please sign in to comment.