@@ -340,11 +340,11 @@ class CollisionInfo(MsgpackMixin):
340340
341341 attribute_order = [
342342 ('has_collided' , bool ),
343+ ('penetration_depth' , float ),
344+ ('time_stamp' , np .uint64 ),
343345 ('normal' , Vector3r ),
344346 ('impact_point' , Vector3r ),
345347 ('position' , Vector3r ),
346- ('penetration_depth' , float ),
347- ('time_stamp' , np .uint64 ),
348348 ('object_name' , str ),
349349 ('object_id' , int )
350350 ]
@@ -379,8 +379,9 @@ def __init__(self, is_rate=True, yaw_or_rate=0.0):
379379class RCData (MsgpackMixin ):
380380 timestamp = 0
381381 pitch , roll , throttle , yaw = (0.0 ,) * 4 # init 4 variable to 0.0
382- switch1 , switch2 , switch3 , switch4 = (0 ,) * 4
383- switch5 , switch6 , switch7 , switch8 = (0 ,) * 4
382+ left_z , right_z = (0.0 ,) * 2
383+ switches = 0
384+ vendor_id = ''
384385 is_initialized = False
385386 is_valid = False
386387
@@ -390,34 +391,26 @@ class RCData(MsgpackMixin):
390391 ('roll' , float ),
391392 ('throttle' , float ),
392393 ('yaw' , float ),
393- ('switch1' , int ),
394- ('switch2' , int ),
395- ('switch3' , int ),
396- ('switch4' , int ),
397- ('switch5' , int ),
398- ('switch6' , int ),
399- ('switch7' , int ),
400- ('switch8' , int ),
394+ ('left_z' , float ),
395+ ('right_z' , float ),
396+ ('switches' , int ),
397+ ('vendor_id' ,str ),
401398 ('is_initialized' , bool ),
402399 ('is_valid' , bool )
403400 ]
404401
405- def __init__ (self , timestamp = 0 , pitch = 0.0 , roll = 0.0 , throttle = 0.0 , yaw = 0.0 , switch1 = 0 ,
406- switch2 = 0 , switch3 = 0 , switch4 = 0 , switch5 = 0 , switch6 = 0 , switch7 = 0 , switch8 = 0 , is_initialized = False ,
402+ def __init__ (self , timestamp = 0 , pitch = 0.0 , roll = 0.0 , throttle = 0.0 , yaw = 0.0 , left_z = 0.0 , right_z = 0.0 , switches = 0 ,
403+ vendor_id = '' , is_initialized = False ,
407404 is_valid = False ):
408405 self .timestamp = timestamp
409406 self .pitch = pitch
410407 self .roll = roll
411408 self .throttle = throttle
412409 self .yaw = yaw
413- self .switch1 = switch1
414- self .switch2 = switch2
415- self .switch3 = switch3
416- self .switch4 = switch4
417- self .switch5 = switch5
418- self .switch6 = switch6
419- self .switch7 = switch7
420- self .switch8 = switch8
410+ self .left_z = left_z
411+ self .right_z = right_z
412+ self .switches = switches
413+ self .vendor_id = vendor_id
421414 self .is_initialized = is_initialized
422415 self .is_valid = is_valid
423416
0 commit comments