def enforce_bounds(self, robot_state_msg): """ Takes a moveit_msgs RobotState and enforces the state bounds, based on the C++ RobotState enforceBounds() """ s = RobotState() c_str = self._g.enforce_bounds( conversions.msg_to_string(robot_state_msg)) conversions.msg_from_string(s, c_str) return s
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
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
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
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
def get_current_state(self): """ Get the current state of the robot.""" s = RobotState() c_str = self._g.get_current_state() conversions.msg_from_string(s, c_str) return s
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
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
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
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