I have been attempting to write a program to read the gyroscope on
our Darwin v2, however it appears that there is no function with the
int ReadByte( int address, int *pValue, int *error ) which is what the documentation indicates I would use to read the data.
for CM730.h contains no declaration of a method with the above
signature. However, it does include declarations for an alternative
ReadByte, with the signature
int ReadByte( int id, int address, int *pValue, int *error ).
Note: I understand that the repository I just linked is not managed by Robotis: however it reflects the code currently on my robot, and I am unable to find an official git repository for the robotis-op package (please consider creating a git repository of some sort. Sourceforge is slow and painful to use)
Unfortunately, that version would seem to be for reading data from the motors- not from the control board itself.
Oddly-enough, the control-board specific version of
WriteWord are declared- it's just the read ones which are missing.
I feel like I must be missing something, but I have
grep'd the entire repository and found nothing. I was hoping somebody could enlighten me on this.
According to my
ReleaseNote.txt, the version of the code I have is
Thank you for waiting while I'm getting response from the OP2 developer.
Below is the translated message from him.
If you are using Robotis Framework and trying to read Gyroscope, you can refer to MakeBulkReadPacket() function in Framework/src/CM730.cpp file.
The function reads 30 bytes from Address 24(P_DXL_POWER) and Gyroscope is read with BulkRead instruction.
The example of using Gyroscope value from BulkRead instruction can be found in the Process() function in Framework/src/motion/MotionManager.cpp file.
As CM-740 reads necessary information with BulkRead therefore ReadByte() is not used anymore.
One of the reasons is that all Read functions require to wait for the Status Packet so it is difficult to use it within 8ms cycle Process() function.
It is designed to read information using BulkRead and write functions that are not required to wait for RxPacket can be used.