コード例 #1
0
ファイル: listener.py プロジェクト: AsstRob/ROS-and-GAZEBO
 def waitForTransform(self,
                      target_frame,
                      source_frame,
                      time,
                      timeout,
                      polling_sleep_duration=None):
     if not self._using_dedicated_thread:
         raise tf2_ros.TransformException(
             "cannot wait for transform without a dedicated thread that listens to incoming TF messages"
         )
     can_transform, error_msg = self._buffer.can_transform(
         strip_leading_slash(target_frame),
         strip_leading_slash(source_frame),
         time,
         timeout,
         return_debug_tuple=True)
     if not can_transform:
         raise tf2_ros.TransformException(
             error_msg or "no such transformation: \"%s\" -> \"%s\"" %
             (source_frame, target_frame))
コード例 #2
0
 def translate(obj, *args, **kwargs):
     try:
         return_value = method(obj, *args, **kwargs)
         return return_value
     except client_binding.ConnectivityException as e:
         raise tf2_ros.ConnectivityException(str(e))
     except client_binding.ExtrapolationException as e:
         raise tf2_ros.ExtrapolationException(str(e))
     except client_binding.LookupException as e:
         raise tf2_ros.LookupException(str(e))
     except client_binding.ExtrapolationException as e:
         raise tf2_ros.ExtrapolationException(str(e))
     except client_binding.InvalidArgumentException as e:
         raise tf2_ros.InvalidArgumentException(str(e))
     except client_binding.TimeoutException as e:
         raise tf2_ros.TimeoutException(str(e))
     except client_binding.TransformException as e:
         raise tf2_ros.TransformException(str(e))