Ejemplo n.º 1
0
 def set_json_goal(self, constraint_type, **kwargs):
     constraint = Constraint()
     constraint.type = constraint_type
     for k, v in kwargs.items():
         if isinstance(v, Message):
             kwargs[k] = convert_ros_message_to_dictionary(v)
     constraint.parameter_value_pair = json.dumps(kwargs)
     self.cmd_seq[-1].constraints.append(constraint)
Ejemplo n.º 2
0
 def set_json_goal(self, constraint_type, **kwargs):
     """
     Set a goal for any of the goals defined in Constraints.py
     :param constraint_type: Name of the Goal
     :type constraint_type: str
     :param kwargs: maps constraint parameter names to values. Values should be float, str or ros messages.
     :type kwargs: dict
     """
     constraint = Constraint()
     constraint.type = constraint_type
     for k, v in kwargs.items():
         if isinstance(v, Message):
             kwargs[k] = convert_ros_message_to_dictionary(v)
     constraint.parameter_value_pair = json.dumps(kwargs)
     self.cmd_seq[-1].constraints.append(constraint)
Ejemplo n.º 3
0
 def set_json_goal(self, constraint_type, **kwargs):
     constraint = Constraint()
     constraint.type = constraint_type
     constraint.parameter_value_pair = json.dumps(kwargs)
     self.cmd_seq[-1].constraints.append(constraint)