Skip to content

Commit afd2058

Browse files
committed
code state for kPAM experiments
1 parent 7c85fad commit afd2058

File tree

10 files changed

+594
-46
lines changed

10 files changed

+594
-46
lines changed

models/iiwa/director/stored_poses.json

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,21 @@
708708
},
709709
"name": "home",
710710
"nominal_handedness": "left"
711+
},
712+
{
713+
"allow_mirror": true,
714+
"description": "",
715+
"joints": {
716+
"iiwa_joint_1": -0.26647037267684937,
717+
"iiwa_joint_2": 0.7008078694343567,
718+
"iiwa_joint_3": 0.6157979965209961,
719+
"iiwa_joint_4": -1.017812967300415,
720+
"iiwa_joint_5": 0.7048412561416626,
721+
"iiwa_joint_6": 1.7503107786178589,
722+
"iiwa_joint_7": -1.3295161724090576
723+
},
724+
"name": "mug_rack_evaluation",
725+
"nominal_handedness": "left"
711726
}
712727
],
713728
"Grasping": [
@@ -1526,6 +1541,96 @@
15261541
},
15271542
"name": "look_at_rack_2",
15281543
"nominal_handedness": "left"
1544+
},
1545+
{
1546+
"allow_mirror": true,
1547+
"description": "",
1548+
"joints": {
1549+
"iiwa_joint_1": 0.42992353439331055,
1550+
"iiwa_joint_2": -0.34932446479797363,
1551+
"iiwa_joint_3": 0.6271766424179077,
1552+
"iiwa_joint_4": -1.1395694017410278,
1553+
"iiwa_joint_5": 0.3954339921474457,
1554+
"iiwa_joint_6": 1.733742356300354,
1555+
"iiwa_joint_7": 0.0733514279127121
1556+
},
1557+
"name": "shoe_evaluation",
1558+
"nominal_handedness": "left"
1559+
},
1560+
{
1561+
"allow_mirror": true,
1562+
"description": "",
1563+
"joints": {
1564+
"iiwa_joint_1": 0.5119408369064331,
1565+
"iiwa_joint_2": 0.6319459676742554,
1566+
"iiwa_joint_3": 0.7225427031517029,
1567+
"iiwa_joint_4": -0.8657618165016174,
1568+
"iiwa_joint_5": 0.3663095235824585,
1569+
"iiwa_joint_6": 1.9009556770324707,
1570+
"iiwa_joint_7": -1.3394646644592285
1571+
},
1572+
"name": "shoe_evaluation_side_2",
1573+
"nominal_handedness": "left"
1574+
},
1575+
{
1576+
"allow_mirror": true,
1577+
"description": "",
1578+
"joints": {
1579+
"iiwa_joint_1": 0.11202535778284073,
1580+
"iiwa_joint_2": 0.48418450355529785,
1581+
"iiwa_joint_3": 0.763058602809906,
1582+
"iiwa_joint_4": -1.034080147743225,
1583+
"iiwa_joint_5": 0.6769240498542786,
1584+
"iiwa_joint_6": 1.8925440311431885,
1585+
"iiwa_joint_7": -1.3538767099380493
1586+
},
1587+
"name": "shoe_evaluation_side",
1588+
"nominal_handedness": "left"
1589+
},
1590+
{
1591+
"allow_mirror": true,
1592+
"description": "",
1593+
"joints": {
1594+
"iiwa_joint_1": 0.029475560411810875,
1595+
"iiwa_joint_2": 0.6006894707679749,
1596+
"iiwa_joint_3": 0.3461817800998688,
1597+
"iiwa_joint_4": -0.760356605052948,
1598+
"iiwa_joint_5": 0.2649575173854828,
1599+
"iiwa_joint_6": 1.657822608947754,
1600+
"iiwa_joint_7": -0.8735575675964355
1601+
},
1602+
"name": "look_at_mug_shelf",
1603+
"nominal_handedness": "left"
1604+
},
1605+
{
1606+
"allow_mirror": true,
1607+
"description": "",
1608+
"joints": {
1609+
"iiwa_joint_1": -0.3235970735549927,
1610+
"iiwa_joint_2": 0.5881968140602112,
1611+
"iiwa_joint_3": 0.47376877069473267,
1612+
"iiwa_joint_4": -1.0043022632598877,
1613+
"iiwa_joint_5": 0.5601233243942261,
1614+
"iiwa_joint_6": 1.5545154809951782,
1615+
"iiwa_joint_7": -1.1482882499694824
1616+
},
1617+
"name": "look_at_mug_shelf_2",
1618+
"nominal_handedness": "left"
1619+
},
1620+
{
1621+
"allow_mirror": true,
1622+
"description": "",
1623+
"joints": {
1624+
"iiwa_joint_1": -0.2651101052761078,
1625+
"iiwa_joint_2": 0.6987987160682678,
1626+
"iiwa_joint_3": 0.6174938082695007,
1627+
"iiwa_joint_4": -1.0204466581344604,
1628+
"iiwa_joint_5": 0.7046487331390381,
1629+
"iiwa_joint_6": 1.7471362352371216,
1630+
"iiwa_joint_7": -1.325123906135559
1631+
},
1632+
"name": "mug_rack_evaluation",
1633+
"nominal_handedness": "left"
15291634
}
15301635
],
15311636
"mug": [
@@ -1693,6 +1798,36 @@
16931798
},
16941799
"name": "horizontal_grasp_approach",
16951800
"nominal_handedness": "left"
1801+
},
1802+
{
1803+
"allow_mirror": true,
1804+
"description": "",
1805+
"joints": {
1806+
"iiwa_joint_1": 0.043940939009189606,
1807+
"iiwa_joint_2": 0.1439794898033142,
1808+
"iiwa_joint_3": -0.017146429046988487,
1809+
"iiwa_joint_4": -1.3585749864578247,
1810+
"iiwa_joint_5": 0.0077800629660487175,
1811+
"iiwa_joint_6": 1.161775827407837,
1812+
"iiwa_joint_7": 0.42396053671836853
1813+
},
1814+
"name": "mug_shelf_image_capture",
1815+
"nominal_handedness": "left"
1816+
},
1817+
{
1818+
"allow_mirror": true,
1819+
"description": "",
1820+
"joints": {
1821+
"iiwa_joint_1": 0.0439445935189724,
1822+
"iiwa_joint_2": 0.14397314190864563,
1823+
"iiwa_joint_3": -0.017145171761512756,
1824+
"iiwa_joint_4": -1.3585752248764038,
1825+
"iiwa_joint_5": 0.007774789817631245,
1826+
"iiwa_joint_6": 1.1617718935012817,
1827+
"iiwa_joint_7": 0.4239634573459625
1828+
},
1829+
"name": "image_capture_for_mug_shelf",
1830+
"nominal_handedness": "left"
16961831
}
16971832
],
16981833
"object_interaction": [

modules/spartan/director/iiwamanipdev.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from spartan.manipulation.category_manipulation import CategoryManipulation
2020
from spartan.utils.director_ros_visualizer import DirectorROSVisualizer
2121

22+
2223
# ros
2324
import tf2_ros
2425

@@ -69,13 +70,12 @@ def setupRLGDirector(globalsDict=None):
6970
# fix for https://github.com/RobotLocomotion/spartan/issues/244
7071
globalsDict['treeViewer'].subscriber.setSpeedLimit(5)
7172

72-
73+
#
7374
ros_visualizer = DirectorROSVisualizer(tf_buffer=tfBuffer)
7475
topic = "/camera_carmine_1/depth/points"
7576
ros_visualizer.add_subscriber(topic, name="Carmine", visualize=True)
7677
globalsDict['ros_visualizer'] = ros_visualizer
77-
# ros_visualizer.start()
78-
78+
ros_visualizer.start()
7979

8080

8181
# load background scene if it exists
@@ -86,12 +86,17 @@ def setupRLGDirector(globalsDict=None):
8686
robotSystem = globalsDict['robotSystem']
8787
robotStateModel = robotSystem.robotStateModel
8888

89+
8990
category_manip = CategoryManipulation(robotStateModel)
9091
category_manip.load_side_table()
91-
# category_manip.load_mug_rack()
92+
category_manip.load_mug_rack()
9293
# category_manip.setup_horizontal_mug_grasp()
93-
category_manip.load_mug_platform()
94-
category_manip.load_shoe_rack()
94+
# category_manip.load_mug_platform()
95+
# category_manip.load_shoe_rack()
96+
97+
98+
graspSupervisor._category_manip = category_manip
99+
95100

96101
def visualize_background():
97102
if not os.path.exists(background_ply_file):

modules/spartan/manipulation/category_manipulation.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,8 @@ def get_object_pose_relative_to_gripper(self):
204204

205205
print(transformUtils.poseFromTransform(T_gripper_object))
206206
return T_gripper_object
207+
208+
209+
@property
210+
def mug_rack_vis_obj(self):
211+
return self._mug_rack

0 commit comments

Comments
 (0)