Building and Visualizing Your First Robot
Get started in robotics with the Duckiebot and Foxglove Studio
Published May 18, 2021
If you're looking to get into robotics, there's no substitute for having a physical robot. It's the only way to get a feel for how sensors and actuators work together and to observe noisy real-world data coming in from sensors. Understanding how everything wires together is a fundamental part of the experience.
Fortunately, all-in-one robotics platforms are becoming increasingly accessible. If you want to focus on machine learning model training, Amazon's DeepRacer provides a ready-to-race autonomous RC car. A wide array of robotic arm kits are also available to purchase at newly reasonable prices. But for the novice roboticist looking for a complete robotics development experience, my current favorite is the Duckiebot.
What is Duckiebot?
Duckiebot is unique, because it provides a deep dive into the real-world challenges and trade-offs that a roboticist would encounter, while still giving you the breadth of exposure to the entire end-to-end system. The Duckiebot kit consists of an embedded computer, a collection of sensors, and a 3D printed frame where you assemble everything by hand. The only tool required is a screwdriver (included in the kit), and you can build the robot in an afternoon.
To give your robot a place to drive, the Duckietown driving track kit comes with foam tiles and masking tape for arranging your tracks and personalizing your miniature town. Best of all, EdX launched a free online companion course (Self-Driving Cars with Duckietown) this year, taking you from a basic working knowledge of software development to a broad understanding of the disciplines involved in building robots.
One of the most fundamental challenges in robotics is system comprehension. Understanding what the robot is sensing (perception), what decisions it is making based on the perceived environment (planning), and how those decisions translate to actuator commands (controls) will be a core part of your development experience. For the Duckiebot, we have a few different tools at our disposal to start grappling with this comprehension challenge.
After you've assembled the hardware, flashed the SD card, and pressed the power button, you are rewarded with the first set of feedback: LEDs and a small display with system health metrics. The Duckiebot kit also provides a web interface with more health metrics and system status.
Getting to the next level of depth requires connecting directly to the robot's software. Like many robotics platforms, Duckiebot builds on top of the Robot Operating System (ROS) framework.
Though I won't go into a complete overview of ROS in this post, it's helpful to know that ROS-based robots are organized into modules called nodes. Nodes share information by publishing and subscribing to topics. Topics can be thought of as a stream of messages sharing a common data type, such as GPS coordinates, camera images, or steering angle commands.
To get a deeper look into what my Duckiebot is seeing or thinking, we need a tool that helps us inspect this underlying ROS data...
Visualizing ROS robots with Foxglove Studio
This is where Foxglove Studio comes in. Our team's long experience in robotics found that the existing tooling is often too rigid or limited to solve many common problems. Robotics tooling should be as accessible and easy to use as Unity3D is for game development, or as Photoshop is for photo editing.
Foxglove Studio uses a concept of panels, where different types of panels visualize information in different ways. These panels include camera feeds, time series plots, an extensible 3D view, a map, a connectivity graph, and more. You can arrange these panels into several dashboard views, or layouts, to investigate what your robot is doing.
Studio works on any platform (in my case, Windows), despite most ROS tools only supporting Linux. It also works out-of-the-box with ROS robots, so we can connect to Duckiebot (or any robot) by opening a new ROS connection to
<your-robot-host>.local - for me, this is
First, to inspect the published sensor data, let's add an Image panel to our layout to get a camera feed.
Our duck is alive!
To get a high-level understanding of what software is running on the robot, you can add a Topic Graph panel, which shows ROS nodes and topics and how they are connected to each other.
A lot is going on in the Duckiebot!
To start with a simplified overview, let's turn off the topics and services using the floating toolbar on the right.
This view allows us to focus on what ROS nodes are currently running and how they connect to each other. Not all nodes are actively publishing data at the moment, since this is a brand new Duckiebot that hasn’t been fully developed into a self-driving robot yet.
From here, you can add more panels and experiment with configuration options to see what other data you can visualize. As a first step, try using the Plot panel to create a time series plot of your Duckiebot’s time-of-flight sensor.
For a head start on experimentation, download this Foxglove Studio layout, which has been preconfigured with the following panels for easy Duckiebot analysis:
You can then import this layout file via the Layouts menu to load it into your Studio app.
Congratulations on building and visualizing your first robot!
If you have any questions or ideas about robotics visualization, we'd love to chat with you in our Slack community.
Get blog posts sent directly to your inbox.