 by PandaVazquez » Fri Aug 08, 2014 7:23 pm
                by PandaVazquez » Fri Aug 08, 2014 7:23 pm
            
            
                     by PandaVazquez
                by PandaVazquez
Fri Aug 08, 2014 7:23 pm
            
            
            Hi.
I understand that, it's possible to read the results of the two algorithms made by HaViMo on C.
Using the HaViMo instructions table and the dynamixel library, the reading code is something like this.
First I have to send the instruction (CAP_GRID) to capture the image and make the algorithm, and  then send the instruction to read the results (READ_GRID), but the main question is: 
What parameters should i use whit the READ_GRID instruction? - Code: Select all
- dxl_set_txpacket_id(100);
 dxl_set_txpacket_instruction(0x15); //CAP_GRID instruction
 dxl_set_txpacket_lenght(2);
 dxl_tx_packet();
 dxl_ping(100);
 While( dxl_get_result( ) != COMM_RXSUCCESS ){ }
 
 dxl_set_txpacket_id(100);
 dxl_set_txpacket_instruction(0x16); //READ_GRID instruction
 dxl_set_txpacket_parameter(0, ? ); // Here is where I don't know
 dxl_set_txpacket_parameter(1, ? ); // what parameters use
 dxl_set_txpacket_lenght(4);
 dxl_txrx_packet();
 
 length=dxl_get_rxpacket_lenght();
 
 
 
Hi.
I understand that, it's possible to read the results of the two algorithms made by HaViMo on C.
Using the HaViMo instructions table and the dynamixel library, the reading code is something like this.
First I have to send the instruction (CAP_GRID) to capture the image and make the algorithm, and  then send the instruction to read the results (READ_GRID), but the main question is: 
What parameters should i use whit the READ_GRID instruction? - Code: Select all
- dxl_set_txpacket_id(100);
 dxl_set_txpacket_instruction(0x15); //CAP_GRID instruction
 dxl_set_txpacket_lenght(2);
 dxl_tx_packet();
 dxl_ping(100);
 While( dxl_get_result( ) != COMM_RXSUCCESS ){ }
 
 dxl_set_txpacket_id(100);
 dxl_set_txpacket_instruction(0x16); //READ_GRID instruction
 dxl_set_txpacket_parameter(0, ? ); // Here is where I don't know
 dxl_set_txpacket_parameter(1, ? ); // what parameters use
 dxl_set_txpacket_lenght(4);
 dxl_txrx_packet();
 
 length=dxl_get_rxpacket_lenght();