-(table.x_min + table.x_max) / 2.0,
                    (new_pose.pose.position.z / 2.0)
                ], [
                    new_pose.pose.orientation.x, new_pose.pose.orientation.y,
                    new_pose.pose.orientation.z, new_pose.pose.orientation.w
                ], table.x_max - table.x_min, table.y_max - table.y_min,
                                             new_pose.pose.position.z)


if __name__ == "__main__":
    # initialize
    rospy.init_node('test_arm_control', anonymous=True)

    object_recognizer = ObjectRecognition()

    arm_mover = MoveGroupCommander('arm')
    arm_mover.go([0, 0, 0, 0, 0, 0, 0])
    os.system('rosrun gripper_control lcg_set_pos.py -n low_cost -f 5 -p 0.13')

    listener = tf.TransformListener()
    planning_scene = PlanningSceneInterface()
    object_listener = ObjectListener(planning_scene, listener)
    rospy.Subscriber("/table_array", TableArray,
                     object_listener.table_callback)

    while True:

        arm_mover.go([0, 0, 0, 0, 0, 0, 0])
        print "Looking for objects."
        objects = object_recognizer.look_for_objects()
        while not objects.recognized_objects.objects: