Quick Start
SDK Playground (Browser-Based Development)
If you're using the SDK Playground, getting started is incredibly simple - just hit SDK Playground on your chosen appliance and you can immediately try out the SDK examples (Load Script). Remember, authentication and connection are all handled automatically for you. Also, use the Visualiser and other tool panels to observe and teleoperate your ROS2 robot.
Standalone Development
For standalone clients (external development), first install the SDK:
JavaScript: Include the OLO Client scripts in your HTML, or see the SDK Demo for a complete example.
Python: Install via pip:
Then use the SDK's built-in authentication and connection methods:
// JavaScript standalone connection
const oloClient = new OLOClient({ apiUrl: 'https://app.olo-robotics.com' });
await oloClient.authenticate('username', 'password');
const robots = await oloClient.getUserRobots();
await oloClient.connect(robots[0].id);See the Standalone Client Development section for complete setup instructions, example applications, and optional dependencies (e.g., video streaming support).
Basic Operations
Once connected, you can perform common robot operations:
Discover Available Topics:
const topics = await oloClient.core.listTopics();
console.log('Available topics:', topics);Subscribe to Sensor Data:
await oloClient.core.subscribe('/sensor_data', (message) => {
console.log('Sensor reading:', message);
});Control Robot Movement:
// Move forward
await oloClient.core.sendVelocity('/cmd_vel', { linear: 0.5, angular: 0 });
// Stop robot
await oloClient.core.stopRobot('/cmd_vel');Start Video Streaming:
// In SDK Playground, videoElement is automatically provided
const { bestTopic } = await oloClient.video.detectVideoTopics();
const session = await oloClient.video.startVideo(bestTopic, videoElement);
console.log('Video streaming started:', session);Record and Playback ROS Data:
// Record ROS topics to bag file
const recording = await oloClient.rosbagRecording.startRecording({
topics: ['/scan', '/odom', '/tf'],
maxDurationSeconds: 30
});
// Play back recorded data
const recordings = await oloClient.rosbagRecording.getRecordedFiles();
const playback = await oloClient.rosbagRecording.startPlayback(recordings[0].name, {
playbackRate: 1.0
});Next Steps
- For SDK Playground: Start coding directly in your browser with AI assistance
- For Standalone Development: See the Standalone Client Development section for complete setup instructions and examples
