Mobility gives you direct control over the robot base — rotation and velocity commands. Use it for custom navigation behaviors that complement the built-in navigation.
Core navigation (built-in)
The robot comes with built-in navigation that the agent calls innately. You don’t need to implement this — it works out of the box.
Do not modify the shipped navigate_to_position skill. It’s a system-level skill the agent uses automatically, and changing it can break navigation.
When you tell the robot “go to the kitchen,” the agent automatically:
-
Translates “kitchen” to map coordinates (if the location is saved)
-
Calls the built-in navigation skill
-
Monitors progress and handles obstacles
To send the robot somewhere from inside your own skill, don’t reimplement any of that — declare navigate_to_position as a sub-skill and call it.
Declaring the base
That’s the whole wiring. self.mobility is guaranteed inside execute().
Methods
Examples
Always pass duration to send_cmd_vel. It arms a deadman stop, so if your loop dies or the process is killed mid-command the base halts on its own instead of driving away. Send a fresh command every iteration with a duration slightly longer than the loop period.
self.mobility.rotate() is blocking, so it is also a cancel point — it raises SkillCancelled and stops the base if a Stop lands mid-rotation. send_cmd_vel returns immediately, so a loop built on it needs self.sleep() to be interruptible.
When to use
Example: LookAround
No _cancelled flag, no cancel() method, no result tuple: rotate() raises SkillCancelled on a Stop, the framework brakes the base and reports CANCELLED, and returning the message reports SUCCESS.
Example: creep forward until something is close
Pairs the base with the lidar feed — a shape that only works because the sleep is cancellable.
time.monotonic() for the deadline, self.sleep() for the pause — measuring with time is fine, blocking with it is not. The base is braked automatically on both exits, so there is no trailing stop().