utils.py
Go to the documentation of this file.
1 #from threading import Thread
2 import numpy
3 
4 def wrap_to_pi(x):
5  return numpy.mod(x+numpy.pi,2*numpy.pi)-numpy.pi
6 
7 def sign(x):
8  if x > 0: return +1
9  if x < 0: return -1
10  return 0
11 
12 #
13 #class WorkerThread(Thread):
14 #
15 # """Convenience wrapper around Thread"""
16 #
17 # def __init__(self, run_callback, finished_callback = None):
18 # super(WorkerThread, self).__init__()
19 # self._run_callback = run_callback
20 # self._finished_callback = finished_callback
21 #
22 ## def start(self):
23 ## self.run = self._run_callback
24 #
25 # def run(self):
26 # self._run_callback()
27 # if self._finished_callback:
28 # self._finished_callback()
29 
def wrap_to_pi(x)
Definition: utils.py:4


kobuki_testsuite
Author(s): Jorge Santos Simon
autogenerated on Mon Jun 10 2019 13:45:22