Go to the documentation of this file.00001 __author__ = 'tom1231'
00002 import struct
00003 from BAL.Header.RiCHeader import RiCHeader
00004
00005 REQ_ID = 81
00006 REQ_LEN = 18
00007
00008
00009 class CloseDiffSetOdomRequest(RiCHeader):
00010 def __init__(self, x, y, theta):
00011 RiCHeader.__init__(self)
00012 self._id = REQ_ID
00013 self._length = REQ_LEN
00014 self._des = 0x1001
00015 self._checkSum = 0
00016 self._x = x
00017 self._y = y
00018 self._theta = theta
00019 self._checkSum = self.calCheckSum(self.dataTosend())
00020
00021
00022 def dataTosend(self):
00023 return RiCHeader.dataTosend(self) \
00024 + struct.pack('<f', self._x) \
00025 + struct.pack('<f', self._y) \
00026 + struct.pack('<f', self._theta)
00027
00028