Ejemplo n.º 1
0
    def get_manipulator(self, env):
        """
        Look up and return the manipulator in the environment.

        @param env: OpenRAVE environment
        @return an OpenRAVE manipulator
        """
        return from_key(env, self._manipulator)
Ejemplo n.º 2
0
    def get_object(self, env):
        """
        Look up and return the object in the environment.

        @param env: OpenRAVE environment
        @return a KinBody
        """
        return from_key(env, self._object)
Ejemplo n.º 3
0
    def get_hand(self, env):
        """
        Look up and return the hand in the given OpenRAVE environment.

        @param env: OpenRAVE environment
        @return a prpy.EndEffector
        """
        return from_key(env, self._hand)
Ejemplo n.º 4
0
    def get_obj(self, env):
        """
        Look up and return the object in the environment.

        @param env: OpenRAVE environment
        @return KinBody to be released
        """
        return from_key(env, self._obj)
Ejemplo n.º 5
0
    def plan(self, env):
        """
        No planning; just create and return a GrabObjectSolution.

        @param env: OpenRAVE environment
        @return a GrabObjectSolution
        """
        # Add PoseValidator precondition
        obj = from_key(env, self._obj)
        obj_pose_validator = ObjectPoseValidator(obj.GetName(),
                                                 obj.GetTransform())

        return GrabObjectSolution(action=self,
                                  obj=from_key(env, self._obj),
                                  dof_values=self.dof_values,
                                  dof_indices=self.dof_indices,
                                  precondition=obj_pose_validator)
Ejemplo n.º 6
0
    def get_on_obj(self, env):
        """
        Look up and return the object to push along in the environment.

        @param env: OpenRAVE environment
        @return a KinBody to push the object along
        """
        return from_key(env, self._on_object)
Ejemplo n.º 7
0
    def get_obj(self, env):
        """
        Look up and return the object in the environment.

        @param env: OpenRAVE environment
        @return KinBody that the TSR is defined on
        """
        return from_key(env, self._obj)
Ejemplo n.º 8
0
    def get_robot(self, env):
        """
        Look up and return the robot in the environment.

        @param env: OpenRAVE environment
        @return an OpenRAVE robot
        """
        return from_key(env, self._robot)
Ejemplo n.º 9
0
    def get_on_obj(self, env):
        """
        Look up and return the object to place on in the environment.

        @param env: OpenRAVE environment
        @return KinBody to place on
        """
        return from_key(env, self._on_obj)
Ejemplo n.º 10
0
    def get_obj(self, env):
        """
        Look up and return the object in the environment.

        @param env: OpenRAVE environment
        @return the object to teleport
        """
        return from_key(env, self._obj)
Ejemplo n.º 11
0
    def get_obj(self, env, obj_key):
        """
        Look up and return a particular object to release in the environment.

        @param env: OpenRAVE environment
        @param obj_key: key for the object to release
        @return the KinBody to be released
        """
        return from_key(env, obj_key)
Ejemplo n.º 12
0
    def get_movables(self, env):
        """
        Look up and return the moveable objects in the environment.

        @param env: OpenRAVE environment
        @return a list of moveable KinBodies
        """
        objs = [from_key(env, m) for m in self._movables]
        return objs
Ejemplo n.º 13
0
    def get_bodies(self, env, bodies):
        """
        Look up and return the bodies in the environment.

        @param env: OpenRAVE environment
        @param bodies: list of body keys
        @return list of Kinbodies
        """
        return [from_key(env, key) for key in bodies]
Ejemplo n.º 14
0
    def get_robot(self, env):
        """
        Look up and return the robot in the environment.

        @param env: OpenRAVE environment
        @return the robot to grab with
        """
        if self._robot is None:
            return None
        return from_key(env, self._robot)
Ejemplo n.º 15
0
 def get_objects(self, env):
     """
     @param env: OpenRAVE environment with objects to disable
     @return list of KinBodies to disable
     """
     return [from_key(env, o) for o in self._objects]