sim2bot.Robot.base_velocity¶
Preview API
This surface is available for evaluation but still has documented limitations.
base_velocity(vx: float = 0.0, vy: float = 0.0, vz: float = 0.0, omega: float = 0.0, robot: int = 0) -> None
¶
Command a supported mobile or aerial base velocity.
Parameters:
-
vx(float, default:0.0) –Forward robot-frame linear velocity in metres per second.
-
vy(float, default:0.0) –Leftward robot-frame linear velocity in metres per second.
-
vz(float, default:0.0) –Vertical velocity in metres per second for aerial bases.
-
omega(float, default:0.0) –Yaw rate in radians per second.
-
robot(int, default:0) –Intended robot index.
Returns:
-
None–The latest velocity command replaces the previous one.
Raises:
-
RuntimeError–If the client is not connected.
-
ConnectionClosed–If the WebSocket closes while sending the command.
-
OSError–If the selected transport cannot send the command.
Warning
Multi-base addressing is not complete. The current browser runtime
drives the scene's primary base even when another robot index is
supplied. Treat this API as preview for multi-robot scenes.
Source code in sim2bot/client.py
Practical examples¶
Examples use objects discovered from the current scene rather than hard-coded robot metadata.
Guidance¶
Important behavior
Multi-base addressing is unfinished. The current runtime drives the primary base even when another robot index is supplied.
Common error
vz is meaningful for supported aerial bases; it does not lift a normal mobile manipulator.