Read HaViMo on C (READ_GRID).

Created by Prof. Hamid Moballegh of The Robocup Humanoid Team of Freie Universität Berlin - fumanoids.de
2 postsPage 1 of 1
2 postsPage 1 of 1

Read HaViMo on C (READ_GRID).

Post by PandaVazquez » Fri Aug 08, 2014 7:23 pm

Post 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();


PandaVazquez offline
Newbie
Newbie
Posts: 2
Joined: Wed Aug 06, 2014 7:52 pm

Re: Read HaViMo on C (READ_GRID).

Post by hamid_m » Mon Sep 15, 2014 6:37 am

Post by hamid_m
Mon Sep 15, 2014 6:37 am

Hi,

READ_GRID is followed by two parameters:

1- Address: it is multiplied by 16 internally to reach more than 256 bytes of memory
2- Number of bytes to read.

for example to read the complete third line (address 64,length 32) parameters are: 4,32

Hamid.
Hi,

READ_GRID is followed by two parameters:

1- Address: it is multiplied by 16 internally to reach more than 256 bytes of memory
2- Number of bytes to read.

for example to read the complete third line (address 64,length 32) parameters are: 4,32

Hamid.
hamid_m offline
Savvy Roboteer
Savvy Roboteer
Posts: 133
Joined: Thu May 03, 2007 4:56 pm


2 postsPage 1 of 1
2 postsPage 1 of 1
cron