1
$\begingroup$

I am new to the create 2 and I downloaded real term to program, opened an interface to the robot and send numbers with it to the robot.

I can only get the drive command to work. I only know how to make the robot go faster, turning around or slower.

I would like to know how to make the other commands work along with making it go left and right.

$\endgroup$
2
$\begingroup$

The documentation states on page 12:

A Drive command with a positive velocity and a positive radius makes Room ba drive forward while turning toward the left. A negative radius makes Roomba turn toward the right. Special cases for the radius make Roomba turn in place or drive straight, as specified below

The radius value is documented this way:

Radius (-2000 – 2000 mm)

Special cases:

Straight = 32768 or 32767 = 0x8000 or 0x7FFF

Turn in place clockwise = -1 = 0xFFFF

Turn in place counter-clockwise = 1 = 0x0001

Obviously supply different values if you are not trying to achieve any of those special cases, like in the example that follows:

Example:

To drive in reverse at a velocity of -200 mm/s while turning at a radius of 500mm, send the following serial byte sequence:

[137] [255] [56] [1] [244]

Explanation:

Desired value -> two’s complement and convert to hex -> split into 2 bytes -> convert to decimal

Velocity = -200 = 0xFF38 = [0xFF] [0x38] = [255] [56]

Radius = 500 = 0x01F4 = [0x01] [0xF4] = [1] [244]

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.