ROBOTIS-GIT / OpenCR

Software for ROS Embedded board (a.k.a. OpenCR). OpenCR means Open-source Control Module for ROS.
Apache License 2.0
384 stars 238 forks source link

Little Endian vs Big Endian #153

Closed renarj closed 5 years ago

renarj commented 5 years ago

It looks to me like the ping instruction is incorrect, it is sending the MSB first for the model number instead of the LSB. In the documentation it states that LSB is always first in the protocol?

Issue is found here on this line: https://github.com/ROBOTIS-GIT/OpenCR/blob/9da4ae9fd4506df6e068c2a6d381f268a0ba371a/arduino/opencr_arduino/opencr/libraries/OP3/examples/opencr_op3/dxl_node_op3.cpp#L600

chcbaram commented 5 years ago

It is sending the LSB first because the lower 8bits of Model_Number is stored in data[0].

data[0] = (p_dxl_mem->Model_Number>>0) & 0xFF; data[1] = (p_dxl_mem->Model_Number>>8) & 0xFF;

HPaper commented 5 years ago

This issue will be closed since there were no actions for a while. You can reopen this issue to show this issue to the users whenever. Thanks.