def __init__(self,env,youbots): self.env = env self.youbots = youbots yik.init(youbots[youbots.keys()[0]]) # does not matter which robot we use to initialize since all youbots have same kinematics. self.iktimes = [] # TODO remove self.collchecktimes = [] # TODO remove self.ngraspstried = 0 self.nconfigstried = 0 self.asm_grasps = [] self.asm_grasp_scores = [] self.grasp_grid_translational_resolution = 0.05 self.grasp_grid_rotational_resolution = np.pi/9.0
def __init__(self, env, youbots): self.env = env self.youbots = youbots yik.init( youbots[youbots.keys()[0]] ) # does not matter which robot we use to initialize since all youbots have same kinematics. self.iktimes = [] # TODO remove self.collchecktimes = [] # TODO remove self.ngraspstried = 0 self.nconfigstried = 0 self.asm_grasps = [] self.asm_grasp_scores = [] self.grasp_grid_translational_resolution = 0.05 self.grasp_grid_rotational_resolution = np.pi / 9.0
import CollisionConstraints import BusRide from chairenv import * #from pictureenv import * #from wingdemoenv import * youbotenv = youbotpy.YoubotEnv(sim=True,viewer=True,env_xml=envfile, \ youbot_names=all_robot_names) env = youbotenv.env youbots = youbotenv.youbots for name in youbots: youbots[name].SetTransform(robot_start_poses[name]) youbotenv.MoveGripper(name, 0.01, 0.01) # open grippers yik.init(youbots[youbots.keys()[0]]) # does not matter which robot # we use to initialize since # all youbots have same kinematics. grasp_generator = GraspGenerator.GraspGenerator(env) for part in all_parts: part.body = env.GetKinBody(part.name) part.SetGrasps(grasp_generator.GeneratePartGrasps(part)) #IPython.embed() def ComputeExtendedBusRide(assembly_operations, busride): # TODO return None if fastener is in the busride extended_busride = {} for asm_op in assembly_operations:
import CollisionConstraints import BusRide from chairenv import * #from pictureenv import * #from wingdemoenv import * youbotenv = youbotpy.YoubotEnv(sim=True,viewer=True,env_xml=envfile, \ youbot_names=all_robot_names) env = youbotenv.env youbots = youbotenv.youbots for name in youbots: youbots[name].SetTransform(robot_start_poses[name]) youbotenv.MoveGripper(name,0.01,0.01) # open grippers yik.init(youbots[youbots.keys()[0]]) # does not matter which robot # we use to initialize since # all youbots have same kinematics. grasp_generator = GraspGenerator.GraspGenerator(env) for part in all_parts: part.body = env.GetKinBody(part.name) part.SetGrasps(grasp_generator.GeneratePartGrasps(part)) #IPython.embed() def ComputeExtendedBusRide(assembly_operations,busride): # TODO return None if fastener is in the busride extended_busride = {} for asm_op in assembly_operations: extended_busride[asm_op.name] = []
def __init__(self,env,youbots): self.env = env self.youbots = youbots yik.init(youbots[youbots.keys()[0]]) # does not matter which robot we use to initialize since all youbots have same kinematics.