Esempio n. 1
0
 def make_message(self, iteration):
     n = iteration
     msg = lcmtest.primitives_t()
     msg.i8 = n % 100
     msg.i16 = n * 10
     msg.i64 = n * 10000
     msg.position[0] = n
     msg.position[1] = n
     msg.position[2] = n
     msg.orientation[0] = n
     msg.orientation[1] = n
     msg.orientation[2] = n
     msg.orientation[3] = n
     msg.num_ranges = n
     msg.ranges = [ i for i in range(msg.num_ranges) ]
     msg.name = "%d" % n
     msg.enabled = n % 2
     return msg
Esempio n. 2
0
 def make_message(self, iteration):
     n = iteration
     msg = lcmtest.primitives_t()
     msg.i8 = n % 100
     msg.i16 = n * 10
     msg.i64 = n * 10000
     msg.position[0] = n
     msg.position[1] = n
     msg.position[2] = n
     msg.orientation[0] = n
     msg.orientation[1] = n
     msg.orientation[2] = n
     msg.orientation[3] = n
     msg.num_ranges = n
     msg.ranges = [i for i in range(msg.num_ranges)]
     msg.name = "%d" % n
     msg.enabled = n % 2
     return msg
Esempio n. 3
0
 def make_message(self, iteration):
     msg = lcmtest.primitives_list_t()
     msg.num_items = iteration
     msg.items = [ lcmtest.primitives_t() for i in range(msg.num_items) ]
     for n in range(msg.num_items):
         ex = msg.items[n]
         ex.i8 = -(n % 100)
         ex.i16 = -n * 10
         ex.i64 = -n * 10000
         ex.position[0] = -n
         ex.position[1] = -n
         ex.position[2] = -n
         ex.orientation[0] = -n
         ex.orientation[1] = -n
         ex.orientation[2] = -n
         ex.orientation[3] = -n
         ex.num_ranges = n
         ex.ranges = [ -i for i in range(n) ]
         ex.name = "%d" % -n
         ex.enabled = bool((n+1) % 2)
     return msg
Esempio n. 4
0
 def make_message(self, iteration):
     msg = lcmtest.primitives_list_t()
     msg.num_items = iteration
     msg.items = [lcmtest.primitives_t() for i in range(msg.num_items)]
     for n in range(msg.num_items):
         ex = msg.items[n]
         ex.i8 = -(n % 100)
         ex.i16 = -n * 10
         ex.i64 = -n * 10000
         ex.position[0] = -n
         ex.position[1] = -n
         ex.position[2] = -n
         ex.orientation[0] = -n
         ex.orientation[1] = -n
         ex.orientation[2] = -n
         ex.orientation[3] = -n
         ex.num_ranges = n
         ex.ranges = [-i for i in range(n)]
         ex.name = "%d" % -n
         ex.enabled = bool((n + 1) % 2)
     return msg