コード例 #1
0
 def get_object_poses(self, object_ids):
     """
     Get the poses from the objects identified by the given object ids list.
     """
     ser_ops = self._psi.get_object_poses(object_ids)
     ops = dict()
     for key in ser_ops:
         msg = Pose()
         conversions.msg_from_string(msg, ser_ops[key])
         ops[key] = msg
     return ops
コード例 #2
0
 def get_attached_objects(self, object_ids=[]):
     """
     Get the attached objects identified by the given object ids list. If no ids are provided, return all the attached objects.
     """
     ser_aobjs = self._psi.get_attached_objects(object_ids)
     aobjs = dict()
     for key in ser_aobjs:
         msg = AttachedCollisionObject()
         conversions.msg_from_string(msg, ser_aobjs[key])
         aobjs[key] = msg
     return aobjs
コード例 #3
0
 def get_attached_objects(self, object_ids = []):
     """
     Get the attached objects identified by the given object ids list. If no ids are provided, return all the attached objects.
     """
     ser_aobjs = self._psi.get_attached_objects(object_ids)
     aobjs = dict()
     for key in ser_aobjs:
         msg = AttachedCollisionObject()
         conversions.msg_from_string(msg, ser_aobjs[key])
         aobjs[key] = msg
     return aobjs 
コード例 #4
0
 def get_object_poses(self, object_ids):
     """
     Get the poses from the objects identified by the given object ids list.
     """
     ser_ops = self._psi.get_object_poses(object_ids)
     ops = dict()
     for key in ser_ops:
         msg = Pose()
         conversions.msg_from_string(msg, ser_ops[key])
         ops[key] = msg
     return ops 
コード例 #5
0
    def get_robot_markers(self, *args):
        """Get a MarkerArray of the markers that make up this robot

        Usage:
            (): get's all markers for current state
            state (RobotState): gets markers for a particular state
            values (dict): get markers with given values
            values, links (dict, list): get markers with given values and these links
            group (string):  get all markers for a group
            group, values (string, dict): get all markers for a group with desired values
        """
        mrkr = MarkerArray()
        if not args:
            conversions.msg_from_string(mrkr, self._r.get_robot_markers())
        else:
            if isinstance(args[0], RobotState):
                msg_str = conversions.msg_to_string(args[0])
                conversions.msg_from_string(mrkr, self._r.get_robot_markers(msg_str))
            elif isinstance(args[0], dict):
                conversions.msg_from_string(mrkr, self._r.get_robot_markers(*args))
            elif isinstance(args[0], str):
                conversions.msg_from_string(mrkr, self._r.get_group_markers(*args))
            else:
                raise MoveItCommanderException("Unexpected type")
        return mrkr
コード例 #6
0
 def get_interface_description(self):
     """ Get the description of the planner interface (list of planner ids) """
     desc = PlannerInterfaceDescription()
     conversions.msg_from_string(desc, self._g.get_interface_description())
     return desc
コード例 #7
0
 def get_trajectory_constraints(self):
     """ Get the actual trajectory constraints in form of a moveit_msgs.msgs.Constraints """
     c = Constraints()
     c_str = self._g.get_trajectory_constraints()
     conversions.msg_from_string(c, c_str)
     return c
コード例 #8
0
 def get_path_constraints(self):
     """ Get the acutal path constraints in form of a moveit_msgs.msgs.Constraints """
     c = Constraints()
     c_str = self._g.get_path_constraints()
     conversions.msg_from_string(c, c_str)
     return c
コード例 #9
0
 def get_path_constraints(self):
     """ Get the acutal path constraints in form of a moveit_msgs.msgs.Constraints """
     c = Constraints()
     c_str = self._g.get_path_constraints()
     conversions.msg_from_string(c,c_str)
     return c