Cmd: Navigation Read
updated on 06-11-2009

dsNav communication

Detailed commands description
Navigation settings group commands

Commands (Cmd field) are one single character long and case sensitive.           

In following list:

- r        this is a command that request parameters reading from dsNav to the master

- w       this is a command that writes parameters to dsNav from the master

- TX    these are the parameters sent from supervisor and received by dsNav

- RX    these are the data sent back by dsNav after a correct decoding of the command and received by external board or PC.

The TxData and RxData procedures will be used as example. The code examples are written in Processing language on the PC side.

D

- w

Setting reference coordinates X, Y computing distance (Mode C)

The robot navigates for N mm starting from current coordinates and with the current orientation

            - TX:

                        CmdLen = 3    Params 2         (1 int = 2 byte. Most Significant First)

Example:

                        TxIntValue[0] = DesDist;

            TxData(0, 'D', 1, 1);

            - RX:

                        N/A

           

P

- w

Setting reference coordinates X, Y in mm (Mode B)

The robot navigates toward the (X, Y) point

            - TX:

                        CmdLen = 5    Params 4         (2 int = 4byte. Most Significant First)

Example:

TxIntValue[0] = DesCoordX;

            TxIntValue[1] = DesCoordY;

            TxData(0, 'P', 2, 1);

            - RX:

                        N/A

 

O

- w

Sets the reference orientation angle in degrees (absolute)

            - TX:

                        CmdLen = 3    Params 2         (1 int = 2 byte.  int Most Significant First)

Example:

TxIntValue[0] = (int)(DesAngle);

            TxData(0, 'O', 1, 1);

            - RX:

                        N/A

 

o

- w

Sets the reference orientation angle in degrees as a delta of the current Theta (relative)

            - TX:

                        CmdLen = 3    Params 2         (1 int = 2 byte. Most Significant First)

Example:

TxIntValue[0] = (int)(DeltaAngle);

            TxData(0, 'o', 1, 1);

            - RX:

                        N/A

 

S

- w

Reference speed setting in mm/s

The robot travels at this speed unless other events occur

            - TX:

                        CmdLen = 3    Params 2         (1 int = 2 byte. Most Significant First) range -999 +999

Example:

TxIntValue[0] = DesSpeed;

            TxData(0, 'S', 1, 1);

            - RX:

                        N/A

 

H

- w

Emergency. Immediate Halt of both motors without decelerating ramp

            - TX:

                        CmdLen = 1    Params 0

Example:

TxData(0, 'H', 0, 1);

            - RX:

                        N/A