
Public Member Functions | |
| def | __init__ (self, wiiMote, freq=100) |
| def | run (self) |
Public Member Functions inherited from wiimote_node.WiimoteDataSender | |
| def | __init__ (self, wiiMote, freq=100) |
| def | canonicalizeWiistate (self) |
| def | obtainWiimoteData (self) |
Public Attributes | |
| pub | |
| threadName | |
Public Attributes inherited from wiimote_node.WiimoteDataSender | |
| angular_velocity_covariance | |
| freq | |
| gyroAbsence_covariance | |
| linear_acceleration_covariance | |
| sleepDuration | |
| wiiMote | |
| wiistate | |
Broadcasting nunchuk accelerator and joystick readings as Joy(stick) messages to Topic joy
Definition at line 375 of file wiimote_node.py.
| def wiimote_node.NunSender.__init__ | ( | self, | |
| wiiMote, | |||
freq = 100 |
|||
| ) |
Initializes the nunchuk Joy(stick) publisher.
Parameters:
wiiMote: a bluetooth-connected, calibrated WIIMote instance
freq: the message sending frequency in messages/sec. Max is 100, because
the Wiimote only samples the sensors at 100Hz.
Definition at line 379 of file wiimote_node.py.
| def wiimote_node.NunSender.run | ( | self | ) |
Loop that obtains the latest nunchuk state, publishes the joystick data, and sleeps. The Joy.msg message types calls for just two fields: float32[] axes, and int32[] buttons.
Definition at line 396 of file wiimote_node.py.
| wiimote_node.NunSender.pub |
Definition at line 394 of file wiimote_node.py.
| wiimote_node.NunSender.threadName |
Definition at line 402 of file wiimote_node.py.