[go: up one dir, main page]

Real-Time Robot Control From the Browser With WebRTC

This ad is not shown to multipass and full ticket holders
React Summit US
React Summit US 2025
November 17 - 21, 2025
New York, US & Online
The biggest React conference in the US
Learn More
In partnership with Focus Reactive
Upcoming event
React Summit US 2025
React Summit US 2025
November 17 - 21, 2025. New York, US & Online
Learn more
Bookmark
GithubProject website
Rate this content

Explore a world of hardware the likes of which you've never seen before! This presentation will contain live demos using both local robots and those in production from across the country. While the technology being used is advanced, the approach is accessible to anyone whose used JavaScript before.

The talk covers the architecture of WebRTC as a stack of technologies for enabling peer-to-peer communication, as well as how it can be leveraged for interacting with embedded hardware and robotics from the browser, all using JavaScript APIs. My goal is to make programming devices more accessible to web developers and demonstrate a practical solution for taking hobby projects from your desk to production. 

This talk has been presented at JSNation 2025, check out the latest edition of this JavaScript Conference.

FAQ

Nick Hare mentioned autonomous, intelligent, and sometimes humanoid robots like Rosie, C3PO, R2D2, Wall-E, and Eve, and also industrial arms and rovers.

Nick Hare is a senior developer advocate at Veeam, a platform for connecting software developers with the physical world.

Veeam is a platform that connects software developers with the physical world, enabling the development of robots and smart machines.

Nick Hare learned through open source projects, presentations at local meetups and conferences, and online videos and blog posts.

Teleoperations, or tele-op, involves monitoring and controlling machines from afar, such as piloting vehicles in environments unsuitable for human life or telepresence experiences.

In WebRTC, the robot acts as an answerer ready to receive calls, while the client acts as a caller. They establish a connection using signaling and then communicate over a data channel.

Tools and frameworks like JSON-RPC 2.0, Johnny 5, and Notify are mentioned for controlling robots using JavaScript and WebRTC.

WebRTC is typically used for voice over IP, video conferencing, and peer-to-peer communication between clients.

RPC provides a structured format for sending commands from the client application to the robot, allowing for communication without specifying exact commands.

WebRTC is discussed as a technology for connecting machines over the internet without needing a central or shared server.

Nick Hehr
Nick Hehr
21 min
16 Jun, 2025

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Nick Hare, developer advocate at Veeam, learned robotics from open source projects. WebRTC facilitates secure machine connections. Implementing WebRTC involves using Stun, ICE candidates, TURN servers, and signaling. Signaling and Remote Procedure Calls are crucial for peer-to-peer communication. Building a proof of concept with Notify involves PubSub messaging and REST API. Establishing WebRTC connections and data channels enables direct messaging. Video streaming and remote control are demonstrated with a webcam connected to a Raspberry Pi. VM robotics development allows building robots and smart machines with cloud support and SDK.

1. Understanding Robotics and WebRTC

Short description:

Nick Hare, developer advocate at Veeam. No formal education in robotics. Learned from open source projects. Robots aid humans in various tasks. Teleoperations for remote monitoring. WebRTC for connecting machines securely. Browser-based technology for peer communication. Libpeer library for WebRTC support.

Hi, my name is Nick Hare. I'm a senior developer advocate at a company called Veeam, a platform for connecting software developers with the physical world. You can find my handle and logo online at most places at Hipster Brown. I'd like to start out by saying I have no formal education in embedded engineering, robotics, or even software development. I've learned from others who have shared their knowledge through open source projects, presentations at local meetups and conferences, and online through videos and blog posts, which makes me so excited to be in a position to share that knowledge with you all today and hopefully inspire you to build your first robot.

Now, when I say robot, what image comes to mind? Growing up, I thought of robots like Rosie or C3PO and R2D2, or even Wall-E and Eve. These are examples of autonomous, intelligent, and sometimes humanoid machines that exist in imaginary worlds. Looking at the world today, there are some robots that match what we've imagined in various forms, atlas, digits, even figure zero one. But most production robotics is in the form of industrial arms or rovers, or really just various actuators and sensors combined together to perform some specific task to aid and assist humans in completing their jobs to be more efficient, safer, and do it from anywhere in the world.

And there are quite a few robotic functions that require monitoring and controlling those machines from afar. This falls under the category of teleoperations or tele-op. And this could include keeping an eye on an autonomous fleet of delivery vehicles or autonomous cars and taking over if they become lost or enter unexpected situations. It could be piloting vehicles that are in environments that are unsuitable for human life, such as deep undersea, in space, or the desert, or telepresence and telemedicine experiences. It can also be used to create unique art like the telegarden. Even those more advanced humanoid robots currently rely on a human in the loop to function.

2. WebRTC Connectivity for Robots

Short description:

Robots communicate in different networks. WebRTC for direct client connections. Legacy in voice over IP and video conferencing. WebRTC capabilities beyond human peers. APIs and protocols enable data exchange. Base protocols IP and UDP for WebRTC.

Now, some robots communicate with remote servers in cloud environments. Some are confined to the local network. And others communicate directly with each other. But what sort of technology and protocols could support connecting to a machine from any other world without exposing it to the public internet? Well, as spoiled by the title of this presentation, we're talking about WebRTC. And you've probably heard about it before and used it in some application built with it.

Now, as the name applies, it was built around browsers and providing a platform for connecting to clients directly without needing to relay through some sort of central or shared server application, which might be required through using something like WebSockets. Due to its legacy tied to voice over IP and video conferencing, WebRTC is largely used for that exact function. We've all been through our fair share of Skype, RIP and Hangouts and Zooms and Teams calls over the years. Some of us may even gone through a peer-to-peer chat messaging tutorial in the past as well.

But those are really only the capabilities that WebRTC has to offer. What if a peer wasn't another human, but a machine answering the call? How could this be possible? Does the robot open a web browser and click around like some type of AI agent? Well, what if we could use the APIs and protocols of WebRTC typically found in the browser, but on a server, aka our robot? WebRTC is really just a stack of acronymed technologies that enable sending audio, video and arbitrary data directly between two clients or peers. And this is to say that most computing devices and programming languages have some way of working with the base protocols of IP and UDP.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

The Whimsical Potential of JavaScript Frameworks
React Summit US 2023React Summit US 2023
28 min
The Whimsical Potential of JavaScript Frameworks
Top Content
Watch video: The Whimsical Potential of JavaScript Frameworks
The speaker discusses the whimsical and detailed work of Stripe, particularly their interactive and dynamic pages. They explain the use of React for building whimsical details and tracking mouse position. The speaker introduces React Spring for smooth animation and React3 Fiber for creating a 3D egg model. They also mention the use of Framer Motion and React server components for animating CSS properties.
Emotional & Functional UI Animations in React
React Day Berlin 2022React Day Berlin 2022
28 min
Emotional & Functional UI Animations in React
Today's Talk discussed the importance of UI animations in React, both functional and emotional. Examples were given using CSS and Framer Motion, with a focus on user feedback and accessibility. Design guidelines and animation usage were highlighted, as well as the consideration of negative emotions in animations. The Talk also touched on designing 404 error pages and concluded with gratitude to the audience and organizers.
JavaScript Haikus: My Adventures in Tiny Coding
JS GameDev Summit 2023JS GameDev Summit 2023
27 min
JavaScript Haikus: My Adventures in Tiny Coding
This Talk is about writing super tiny JavaScript programs, known as tiny code. It explores the concept of code golf and the use of a live editor for instant feedback. The Talk discusses various ways to share tiny code, including Twitter.net. It also covers creating graphics, games, and sound in a small space. The speaker highlights inspiring tweets and showcases examples of tiny code, including asemic writing. The future of tiny code includes new techniques, better browser support, and AI-assisted programming.
The Hitchiker's Guide to Event Driven Architectures
Node Congress 2025Node Congress 2025
30 min
The Hitchiker's Guide to Event Driven Architectures
Premium
Today's Talk introduced event-driven architectures with Node.js. The event loop in Node.js enables non-blocking interaction between components. The event emitter class is used to handle events synchronously. Redis and Apache Kafka are popular tools for event handling, with Kafka providing scalability and persistence. Kafka.js is a JavaScript library that supports transactions and compression. Server-sent events are used to send events to the client. A plugin and library are used to convert an event emitter to an async iterator. The client displays emojis and updates the vote count.
How I've been Using JavaScript to Automate my House
JSNation 2022JSNation 2022
22 min
How I've been Using JavaScript to Automate my House
The Talk covers various experiments with JavaScript and C++, including controlling lights and creating a car control system. The speaker shares his experiences with home automation and the challenges of hiding wires. He explores using JavaScript with Esperino for face recognition and discusses the benefits and limitations of the platform. The Talk concludes with suggestions for using JavaScript in hardware projects and learning opportunities.
Building an IoT App With InfluxDB, JavaScript, and Plotly.js
JSNation 2023JSNation 2023
20 min
Building an IoT App With InfluxDB, JavaScript, and Plotly.js
This Talk introduces building an IoT app with InfluxDB, JavaScript, and PlotlyJS, highlighting the benefits of time series databases for handling high ingestion rates and data manipulation. It provides instructions for setting up IoT devices and connecting sensors, along with data cleaning and transformation techniques. The Talk covers creating a bucket in InfluxDB, using JavaScript client libraries for data read and write, querying and graphing data with InfluxDB and Plotly.js, creating dashboards, and available learning resources. Overall, it offers a comprehensive overview of building IoT applications with InfluxDB.

Workshops on related topic

Build an IoT App With InfluxDB
JSNation Live 2021JSNation Live 2021
105 min
Build an IoT App With InfluxDB
Workshop
Miroslav Malecha
Miroslav Malecha
InfluxDB is an open source time series database that empowers developers to build IoT, analytics and monitoring software. It is purpose-built to handle the massive volumes and countless sources of time-stamped data produced sensors, applications and infrastructure.
This workshop showcases a fully functional sample application called IoT Center that is built on InfluxDB. This application demonstrates the capabilities of the InfluxDB platform to develop a JavaScript-enabled time-series-based application. It collects, stores and displays a set of values that include temperature, humidity, pressure, CO2 concentration, air quality, as well as provide GPS coordinates from a set of IoT devices. With this data stored in InfluxDB, the application can query this data for display as well as write data back into the database.
This hands-on workshop will show students how to install this open source code to learn how to query and write to InfluxDB using the InfluxDB JavaScript client, and gain familiarity with the Flux lang query language which is designed for querying, analyzing, and acting on time series data. And finally, collect and visualize performance data of the Node JS application.
IoT Center Workshop by InfluxData
Node Congress 2021Node Congress 2021
131 min
IoT Center Workshop by InfluxData
Workshop
Miroslav Malecha
Miroslav Malecha
InfluxDB is an open source time series database that empowers developers to build IoT, analytics and monitoring software. It is purpose-built to handle the massive volumes and countless sources of time-stamped data produced sensors, applications and infrastructure. This workshop showcases a fully functional sample application called IoT Center that is built on InfluxDB. This application demonstrates the capabilities of the InfluxDB platform to develop a JavaScript-enabled time-series-based application. It collects, stores and displays a set of values that include temperature, humidity, pressure, CO2 concentration, air quality, as well as provide GPS coordinates from a set of IoT devices. With this data stored in InfluxDB, the application can query this data for display as well as write data back into the database.
This hands-on workshop will show students how to install this open source code to learn how to query and write to InfluxDB using the InfluxDB JavaScript client, and gain familiarity with the Flux lang query language which is designed for querying, analyzing, and acting on time series data. And finally, collect and visualize performance data of the Node JS application.
Prerequisites
Registered free InfluxDB Cloud account at https://cloud2.influxdata.comThree options available (via Google account, via Microsoft account or via email)Test login after the registration and save credentials for the workshopInstallation of the git tool (e.g. from https://git-scm.com/downloads)IoT Center cloneRun: git clone https://github.com/bonitoo-io/iot-center-v2Installed nodejs (from https://nodejs.org/en/download)Installed yarn package manager (from https://classic.yarnpkg.com/en/docs/install)Installed required packagesIn the cloned directoryRun: cd appRun: yarn install