...
POST No. 2407613
GroupSyncWrite: example with two dynamixels?
2019-10-03 07:32:59 colinator

Hi - do you have any example code for controlling two dynamixels with a single GroupSyncWrite (in c++)? Your existing example code doesn't cover this case.


Specifically:

- can this even be done? Can I write A and B to motor 1 and C and D and E to motor 2?

- If so, when I instantiate the GroupSyncWrite, what is the value of the data_length? The size of the values I am passing to A or the size of the values I am passing to B, or the sum, or the max?

- When I write the data to 'initialize' the GroupSyncWrite, like so:

dxl_comm_result = packetHandler->write2ByteTxRx(portHandler, DXL_ID, ADDR_PRO_INDIRECTADDRESS_FOR_WRITE + 0, ADDR_PRO_GOAL_POSITION + 0, &dxl_error);

  how does the work for different motors? 

 


2019-10-03 07:32:59
colinator
2019-10-11 17:09:32 Will Son

Hi,


The SyncWrite is intended to write the data to the same address.

If you wish to write different data and data length on various addresses, please use Bulk Write as it will allow you to specify multiple addresses and data for multiple DYNAMIXELs.

Sync Read and Write example is available from DYNAMIXEL SDK > C++ > Example > sync_read_write.cpp


Thank you.

2019-10-11 17:09:32
willson
Reply
웹에디터 시작 웹 에디터 끝