Hello,
I am using the described items in the heading. I am receiving some errors and odd behavior from my servos that is most likely my fault.
[TxRxResult] Incorrect status packet!
[ID:001] GoalPos:180 PresPos:000
[TxRxResult] Incorrect status packet!
[ID:001] GoalPos:180 PresPos:000
[TxRxResult] Incorrect status packet!
[ID:001] GoalPos:180 PresPos:000
[TxRxResult] Incorrect status packet!
[ID:001] GoalPos:180 PresPos:000
[TxRxResult] Incorrect status packet!
[ID:001] GoalPos:180 PresPos:000
[ID:001] GoalPos:180 PresPos:179
My Goal Position and Present Position print many times while the servos do nothing. I am using the read_write.py and sync_write.py files in the python/examples/ dir.
Anyway, my source so far has just been me adding in the required data into the listed fields for testing.
For example, this is sync_write.py:
from dynamixel_sdk import * # Uses Dynamixel SDK library
# Control table address
ADDR_MX_TORQUE_ENABLE = 24
ADDR_MX_GOAL_POSITION = 30
ADDR_MX_PRESENT_POSITION = 36
# Data Byte Length
LEN_MX_GOAL_POSITION = 4
LEN_MX_PRESENT_POSITION = 4
# Protocol version
PROTOCOL_VERSION = 1.0
# Default setting
DXL1_ID = 1
DXL2_ID = 2
BAUDRATE = 57600
DEVICENAME = '/dev/ttyUSB0'
TORQUE_ENABLE = 1
TORQUE_DISABLE = 0
DXL_MINIMUM_POSITION_VALUE = 0
DXL_MAXIMUM_POSITION_VALUE = 90
DXL_MOVING_STATUS_THRESHOLD = 20
index = 0
dxl_goal_position = [DXL_MINIMUM_POSITION_VALUE, DXL_MAXIMUM_POSITION_VALUE]
…
and so on…
So, my question basically is, “How can I use the lib. w/out printing the Present and Goal Position so many times?”
The time it takes to run through the source for the print statements is longer than the actual time for the maneuvers from the Servos, i.e. AX-12As.
Seth
P.S. This may seem funny b/c of it just being print statements but they are heavily repetitive and taking a lot of processing time, right? Anyway, any ideas would be nice.