Exemple #1
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import numpy as np

from GraspRegions import GraspRegions
from AssemblyOperation import Part,AssemblyOperation

envfile = 'environments/simple.env.xml'

rightside                  = Part('rightside',is_transferable=True)
back                       = Part('back',is_transferable=True)
cseat                      = Part('cseat',is_transferable=True)
leftside                   = Part('leftside',is_transferable=True)
all_parts = [rightside,back,cseat,leftside]

all_robot_names = ['drc1','drc2','drc3']

all_object_names = ['rightside','back','cseat','leftside']

rightside_and_back = AssemblyOperation(assembly_list        = [rightside,back,cseat],
                                       assembly_poses       = [np.eye(4), 
                                                               np.array([[  1.0           ,   0.0           ,   0.0           ,-0.095],
                                                                         [  0.0           ,   0.0           ,   1.0           , 0.02],
                                                                         [  0.0           ,  -1.0           ,   0.0           , 0.27],
                                                                         [  0.0           ,   0.0           ,   0.0           , 1.0]]),
                                                               np.array([[ 0.     ,  0.     ,  1.    , -0.07255655],
                                                                         [ 0.     ,  1.     ,  0.    ,  0.08884105],
                                                                         [-1.     ,  0.     ,  0.    ,  0.14110599],
                                                                         [ 0.     ,  0.     ,  0.    ,  1.        ]])],
                                       assembly_robot_names = ['drc1','drc3','drc2'],
Exemple #2
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import numpy as np

from GraspRegions import GraspRegions
from AssemblyOperation import Part, AssemblyOperation

envfile = 'environments/chair.env.xml'

rightside = Part('rightside', is_transferable=True)
leftside = Part('leftside', is_transferable=True)
back = Part('back', is_transferable=True)
seat = Part('seat', is_transferable=True)
fastener_rightside_to_back = Part('fastener_rightside_to_back',
                                  is_transferable=False)
fastener_leftside_to_back = Part('fastener_leftside_to_back',
                                 is_transferable=False)
fastener_rightside_to_seat = Part('fastener_rightside_to_seat',
                                  is_transferable=False)
fastener_leftside_to_seat = Part('fastener_leftside_to_seat',
                                 is_transferable=False)
all_parts = [
    rightside, back, fastener_rightside_to_back, seat,
    fastener_rightside_to_seat, leftside, fastener_leftside_to_seat,
    fastener_leftside_to_back
]

#all_robot_names = ['drc1','drc2','drc3','drc4','drc5']
all_robot_names = ['drc1', 'drc2', 'drc3', 'drc4']
Exemple #3
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import numpy as np

from GraspRegions import GraspRegions
from AssemblyOperation import Part, AssemblyOperation

envfile = 'environments/simple.env.xml'

rightside = Part('rightside', is_transferable=True)
back = Part('back', is_transferable=True)
fastener_rightside_to_back = Part('fastener_rightside_to_back',
                                  is_transferable=False)
all_parts = [rightside, back, fastener_rightside_to_back]

#all_robot_names = ['drc1','drc2','drc3','drc4','drc5']
all_robot_names = ['drc1', 'drc2', 'drc3']

all_object_names = ['rightside', 'back', 'fastener_rightside_to_back']

rightside_and_back = AssemblyOperation(
    assembly_list=[rightside, back, fastener_rightside_to_back],
    assembly_poses=[
        np.eye(4),
        np.array([[1.0, 0.0, 0.0, -0.095], [0.0, 0.0, 1.0, 0.02],
                  [0.0, -1.0, 0.0, 0.27], [0.0, 0.0, 0.0, 1.0]]),
        np.array([[1., 0., 0., -8.99258554e-02], [0., 1., 0., -0.08],
                  [0., 0., 1., 2.84104079e-01], [0., 0., 0., 1.]])
    ],
    assembly_robot_names=['drc1', 'drc3', 'drc2'],
import IPython

envfile = 'environments/random_array.env.xml'

num_parts = 3
total_num = num_parts * num_parts * 2

vertical_parts = {}
horizontal_parts = {}
all_names = []

all_robot_names = ['drc1', 'drc2', 'drc3', 'drc4', 'drc5']
for i in range(total_num):
    vert_name = 'link_vertical' + str(i)
    horizontal_name = 'link_horizontal' + str(i)
    vertical_parts[horizontal_name] = Part(vert_name, is_transferable=True)
    horizontal_parts[vert_name] = Part(horizontal_name, is_transferable=True)

all_parts = vertical_parts.values() + horizontal_parts.values()
all_object_names = vertical_parts.keys() + horizontal_parts.keys()

assembly_operations = []
for part in all_parts:
    assembly_operations.append(part)

side_length = 0.2

parity = 1
for i in range(len(all_parts) / 4):
    #i is the plus sign number
    idx = i * 2
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import numpy as np

from GraspRegions import GraspRegions
from AssemblyOperation import AssemblyOperation, Part

envfile = 'environments/pictureframe.env.xml'
fastener1                  = Part('fastener1',is_transferable=False)
fastener2                  = Part('fastener2',is_transferable=False)
fastener3                  = Part('fastener3',is_transferable=False)
fastener4                  = Part('fastener4',is_transferable=False)
fastener5                  = Part('fastener5',is_transferable=False)
fastener6                  = Part('fastener6',is_transferable=False)
fastener7                  = Part('fastener7',is_transferable=False)
fastener8                  = Part('fastener8',is_transferable=False)
fastener9                  = Part('fastener9',is_transferable=False)
fastener10                  = Part('fastener10',is_transferable=False)
fastener11                  = Part('fastener11',is_transferable=False)
fastener12                  = Part('fastener12',is_transferable=False)
fastener13                  = Part('fastener13',is_transferable=False)
fastener14                  = Part('fastener14',is_transferable=False)
sidelink1                  = Part('sidelink1',is_transferable=True)
sidelink2                  = Part('sidelink2',is_transferable=True)
sidelink3                  = Part('sidelink3',is_transferable=True)
sidelink4                  = Part('sidelink4',is_transferable=True)
sidelink5                  = Part('sidelink5',is_transferable=True)
sidelink6                  = Part('sidelink6',is_transferable=True)
sidelink7                  = Part('sidelink7',is_transferable=True)
sidelink8                  = Part('sidelink8',is_transferable=True)