def load_world(): # TODO: store internal world info here to be reloaded with HideOutput(): robot = load_model(DRAKE_IIWA_URDF) #add_data_path() #robot = load_pybullet(KUKA_IIWA_URDF) floor = load_model('models/short_floor.urdf') sink = load_model(SINK_URDF, pose=Pose(Point(x=-0.5))) stove = load_model(STOVE_URDF, pose=Pose(Point(x=+0.5))) celery = load_model(BLOCK_URDF, fixed_base=False) radish = load_model(SMALL_BLOCK_URDF, fixed_base=False) #cup = load_model('models/dinnerware/cup/cup_small.urdf', # Pose(Point(x=+0.5, y=+0.5, z=0.5)), fixed_base=False) body_names = { sink: 'sink', stove: 'stove', celery: 'celery', radish: 'radish', } movable_bodies = [celery, radish] set_pose(celery, Pose(Point(y=0.5, z=stable_z(celery, floor)))) set_pose(radish, Pose(Point(y=-0.5, z=stable_z(radish, floor)))) set_default_camera() return robot, body_names, movable_bodies
def load_world(): # TODO: store internal world info here to be reloaded set_default_camera() draw_global_system() with HideOutput(): #add_data_path() robot = load_model(DRAKE_IIWA_URDF, fixed_base=True) # DRAKE_IIWA_URDF | KUKA_IIWA_URDF floor = load_model('models/short_floor.urdf') sink = load_model(SINK_URDF, pose=Pose(Point(x=-0.5))) stove = load_model(STOVE_URDF, pose=Pose(Point(x=+0.5))) celery = load_model(BLOCK_URDF, fixed_base=False) radish = load_model(SMALL_BLOCK_URDF, fixed_base=False) #cup = load_model('models/dinnerware/cup/cup_small.urdf', # Pose(Point(x=+0.5, y=+0.5, z=0.5)), fixed_base=False) draw_pose(Pose(), parent=robot, parent_link=get_tool_link(robot)) # TODO: not working # dump_body(robot) # wait_for_user() body_names = { sink: 'sink', stove: 'stove', celery: 'celery', radish: 'radish', } movable_bodies = [celery, radish] set_pose(celery, Pose(Point(y=0.5, z=stable_z(celery, floor)))) set_pose(radish, Pose(Point(y=-0.5, z=stable_z(radish, floor)))) return robot, body_names, movable_bodies
def load_world(): # TODO: store internal world info here to be reloaded with HideOutput(): robot = load_model(DRAKE_IIWA_URDF) # robot = load_model(KUKA_IIWA_URDF) floor = load_model('models/short_floor.urdf') sink = load_model(SINK_URDF, pose=Pose(Point(x=-0.5))) stove = load_model(STOVE_URDF, pose=Pose(Point(x=+0.5))) block = load_model(BLOCK_URDF, fixed_base=False) block1 = load_model(BLOCK_URDF, fixed_base=False) block2 = load_model(BLOCK_URDF, fixed_base=False) block3 = load_model(BLOCK_URDF, fixed_base=False) block4 = load_model(BLOCK_URDF, fixed_base=False) block5 = load_model(BLOCK_URDF, fixed_base=False) block6 = load_model(BLOCK_URDF, fixed_base=False) block7 = load_model(BLOCK_URDF, fixed_base=False) block8 = load_model(BLOCK_URDF, fixed_base=False) cup = load_model( 'models/cup.urdf', #'models/dinnerware/cup/cup_small.urdf' fixed_base=False) body_names = { sink: 'sink', stove: 'stove', block: 'celery', cup: 'cup', } movable_bodies = [ block, cup, block1, block2, block3, block4, block5, block6, block7, block8 ] set_pose(block, Pose(Point(x=0.1, y=0.5, z=stable_z(block, floor)))) set_pose(block1, Pose(Point(x=-0.1, y=0.5, z=stable_z(block1, floor)))) set_pose(block2, Pose(Point(y=0.35, z=stable_z(block2, floor)))) set_pose(block3, Pose(Point(y=0.65, z=stable_z(block3, floor)))) set_pose(block4, Pose(Point(x=0.1, y=0.65, z=stable_z(block4, floor)))) set_pose(block5, Pose(Point(x=-0.1, y=0.65, z=stable_z(block5, floor)))) set_pose(block6, Pose(Point(x=0.1, y=0.35, z=stable_z(block6, floor)))) set_pose(block7, Pose(Point(x=-0.1, y=0.35, z=stable_z(block7, floor)))) set_pose(block8, Pose(Point(x=0, y=0.5, z=0.45))) set_pose(cup, Pose(Point(y=0.5, z=stable_z(cup, floor)))) set_default_camera() return robot, body_names, movable_bodies
def load_world(): # TODO: store internal world info here to be reloaded robot = load_model(DRAKE_IIWA_URDF) # robot = load_model(KUKA_IIWA_URDF) floor = load_model('models/short_floor.urdf') sink = load_model(SINK_URDF, pose=Pose(Point(x=-0.5))) stove = load_model(STOVE_URDF, pose=Pose(Point(x=+0.5))) block = load_model(BLOCK_URDF, fixed_base=False) #cup = load_model('models/dinnerware/cup/cup_small.urdf', Pose(Point(x=+0.5, y=+0.5, z=0.5)), fixed_base=False) body_names = { sink: 'sink', stove: 'stove', block: 'celery', } movable_bodies = [block] set_pose(block, Pose(Point(y=0.5, z=stable_z(block, floor)))) set_default_camera() return robot, body_names, movable_bodies