Run Edge Impulse Vision on a JetBot with Rubik Pi
This tutorial runs an Edge Impulse object-detection model on a JetBot-class robot using a Qualcomm Rubik Pi, Ubuntu 24.04, and ROS 2 Jazzy. It combines the robot-specificjetbot_ros package with edgeimpulse_ros.
edgeimpulse_ros subscribes to a sensor_msgs/Image topic and publishes detections; the JetBot launch file starts a v4l2_camera driver to supply those frames. jetbot_ros provides motor control, teleoperation, navigation, and launch integration. Keeping these roles separate makes the same perception node reusable across different robot platforms.

JetBot Gazebo development environment and simulated camera stream
What you will build
You will run local object detection on the robot’s camera feed, publish the results into ROS 2, and keep the mobile base control path available for robot-specific behavior nodes.Prerequisites
- A Rubik Pi running Ubuntu 24.04 and ROS 2 Jazzy.
- A SparkFun JetBot AI Kit v2.0 or compatible JetBot-class chassis with a SparkFun or Waveshare motor controller.
- A USB camera connected to the Rubik Pi.
- A Linux
.eimobject-detection model exported from Edge Impulse Studio. - Local copies of ei_jetbot_ros_rubikpi and edgeimpulse-ros.
1. Provision the Rubik Pi
On the Rubik Pi, run the repository’s provisioner:vision_msgs, diagnostic_msgs, OpenCV, NumPy, PortAudio (for the SDK’s pyaudio dependency), and the JetBot hardware dependencies. For the SparkFun hardware path, confirm the Qwiic driver is available:
2. Build a shared ROS 2 workspace
The JetBot helper links both packages into the same workspace:3. Start motor control and object detection
The integrated launch file starts the motor node, av4l2_camera driver, and the edgeimpulse_ros detector. Give it the model path and the camera device:
4. Inspect inference output
The detector publishes these topics:
Keep the vision pipeline observational until detections are stable. A downstream behavior node should gate any autonomous action on confidence, label, and robot state rather than acting on every frame.
Motor and camera checks
Before connecting detection output to autonomy, verify the base robot path independently. Start normal hardware control:Simulation notes
The repository includes Gazebo Classic worlds for navigation and data collection. Use them on an Ubuntu or WSL development machine where Gazebo Classic is available:edgeimpulse_ros package subscribes to a sensor_msgs/Image topic, so it can in principle consume the Gazebo camera stream by pointing image_topic at it. This repo validates the detector against the real V4L2 camera path, so treat the Gazebo integration as unvalidated.
Troubleshooting
Next steps
- Add a behavior node that subscribes to
/edgeimpulse_detector/detectionsand publishes guarded/cmd_velcommands. - Watch
/diagnostics(FPS and latency) under load to understand the inference budget. - Collect additional training data from the final camera position.
- Validate any autonomous behavior at low speed before increasing robot velocity.