|
Haptic Controller
|
Functions | |
| value_by_label (label) | |
Variables | |
| str | COM_PORT = "COM11" |
| int | TRAILING_POINTS = 16 |
| int | MIN_MESSAGE_BYTES = 16 |
| ser | |
| list | joint_0_list = [] |
| list | joint_1_list = [] |
| list | joint_0_mirror_list = [] |
| list | joint_1_mirror_list = [] |
| pp | |
| alpha | |
| bytes_to_read = ser.in_waiting | |
| line = ser.read(bytes_to_read).decode("utf-8") | |
| segments = line.split() | |
| joint_0 = value_by_label("joint_thetas.at(0)") | |
| joint_1 = value_by_label("joint_thetas.at(1)") | |
| joint_0_mirror = value_by_label("mirror_pos_0") | |
| joint_1_mirror = value_by_label("mirror_pos_2") | |
| int | joint_0_torque = 0 |
| int | joint_1_torque = 0 |
Reads data from a serial port and displays it in real-time using matplotlib. Make sure to set COM_PORT to the correct value before running.
| thumb_viz.value_by_label | ( | label | ) |
Definition at line 53 of file thumb_viz.py.
| thumb_viz.alpha |
Definition at line 37 of file thumb_viz.py.
| thumb_viz.bytes_to_read = ser.in_waiting |
Definition at line 44 of file thumb_viz.py.
| str thumb_viz.COM_PORT = "COM11" |
Definition at line 9 of file thumb_viz.py.
| thumb_viz.joint_0 = value_by_label("joint_thetas.at(0)") |
Definition at line 56 of file thumb_viz.py.
| list thumb_viz.joint_0_list = [] |
Definition at line 24 of file thumb_viz.py.
| thumb_viz.joint_0_mirror = value_by_label("mirror_pos_0") |
Definition at line 58 of file thumb_viz.py.
| list thumb_viz.joint_0_mirror_list = [] |
Definition at line 26 of file thumb_viz.py.
| thumb_viz.joint_0_torque = 0 |
Definition at line 61 of file thumb_viz.py.
| thumb_viz.joint_1 = value_by_label("joint_thetas.at(1)") |
Definition at line 57 of file thumb_viz.py.
| list thumb_viz.joint_1_list = [] |
Definition at line 25 of file thumb_viz.py.
| thumb_viz.joint_1_mirror = value_by_label("mirror_pos_2") |
Definition at line 59 of file thumb_viz.py.
| list thumb_viz.joint_1_mirror_list = [] |
Definition at line 27 of file thumb_viz.py.
| thumb_viz.joint_1_torque = 0 |
Definition at line 62 of file thumb_viz.py.
| thumb_viz.line = ser.read(bytes_to_read).decode("utf-8") |
Definition at line 47 of file thumb_viz.py.
| int thumb_viz.MIN_MESSAGE_BYTES = 16 |
Definition at line 11 of file thumb_viz.py.
| thumb_viz.pp |
Definition at line 29 of file thumb_viz.py.
| thumb_viz.segments = line.split() |
Definition at line 48 of file thumb_viz.py.
| thumb_viz.ser |
Definition at line 13 of file thumb_viz.py.
| int thumb_viz.TRAILING_POINTS = 16 |
Definition at line 10 of file thumb_viz.py.