Exemple #1
0
 def __init__(self, urdf, *args, **kwargs):
     """
     :param urdf:
     :type urdf: str
     :param joints_to_symbols_map: maps urdfs joint names to symbols
     :type joints_to_symbols_map: dict
     :param default_joint_vel_limit: all velocity limits which are undefined or higher than this will be set to this
     :type default_joint_vel_limit: Symbol
     """
     self.original_urdf = hacky_urdf_parser_fix(urdf)
     with suppress_stderr():
         self._urdf_robot = up.URDF.from_xml_string(self.original_urdf)  # type: up.Robot
     self._link_to_marker = {}
     self.reset_cache()
 def __init__(self, urdf, default_joint_vel_limit=0):
     """
     :param urdf:
     :type urdf: str
     :param joints_to_symbols_map: maps urdf joint names to symbols
     :type joints_to_symbols_map: dict
     :param default_joint_vel_limit: all velocity limits which are undefined or higher than this will be set to this
     :type default_joint_vel_limit: float
     """
     self.default_joint_velocity_limit = default_joint_vel_limit
     self.default_weight = 0.0001
     self.fks = {}
     self._joint_to_frame = {}
     self.joint_to_symbol_map = keydefaultdict(lambda x: spw.Symbol(x))
     self.urdf = urdf
     with suppress_stderr():
         self._urdf_robot = URDF.from_xml_string(
             hacky_urdf_parser_fix(self.urdf))