Movement Tutorial
RoboCrew provides pre-built wheel controls and navigation logic for mobile robots like the XLeRobot. This tutorial covers how to implement basic and advanced movement.
1. Basic Setup
Section titled “1. Basic Setup”To move a robot, you need to initialize a ServoControler or utilize the SDK-based tools and pass them to an LLMAgent.
XLeRobot Example
Section titled “XLeRobot Example”2. Navigation Tools
Section titled “2. Navigation Tools”RoboCrew supports several standard movement types through its tool factory functions:
- Linear Movement:
move_forward(distance_meters)andmove_backward(distance_meters). - Rotation:
turn_left(angle_degrees)andturn_right(angle_degrees). - Sideways Movement:
strafe_left(distance_meters)andstrafe_right(distance_meters). - Look Around: Use the
look_aroundtool if a target is not visible. This rotates the head/camera to capture a 270° panorama (Left, Left-Center, Right-Center, Right) instead of moving blindly.
3. Navigation Modes
Section titled “3. Navigation Modes”XLeRobot supports two distinct navigation modes that allow the agent to move effectively or precisely based on the situation in indoor environments:
- Normal Mode: Used for long-distance navigation (0.5m – 3m). The camera looks forward at the horizon to identify distant targets.
- Precision Mode: Used for close-range movement (0.1m – 0.5m) and manipulation. The camera tilts downward so the agent can see its own body, arm reach boundaries (green lines), and obstacles immediately in front of it.