
Develop a web interface to operate and monitor ros-enabled robots, display live position, orientation, and velocities, and navigate via a map with a web-based joystick control and emergency stop.
Learn to build a web-based ros interface with react and bootstrap, using javascript libraries and rosbridge widgets to publish and subscribe, visualize maps, and enable browser navigation and robot control.
Set up a new react app with create react app, name the project, install dependencies, and begin developing an application that will interact with and monitor robots.
Explore the anatomy of a React app by inspecting the node_modules, public directory, index.html, and root element, and learn how the app renders into the root using React.
Clean up and prepare the project, then integrate a bootstrap theme by downloading and importing a bootstrap package, trying Spacelab, sketchy, and other layouts to tailor the app's look.
Create header and footer components and assemble them into a React app. Organize components in a folder, import header, footer, and body, and render a navigation menu.
Build a header navigation bar inside the header component with bootstrap in a React app, install react-bootstrap, import Navbar, and configure links to home and about pages using routing.
Learn how to build a simple router in a React app to switch between home and about pages, using a Bootstrap container and React Router's switch and route components.
Finalize the footer in the boilerplate, center the main content using 80% height, and prepare for publisher-subscriber interactions, map visualization, and navigation actions with React on the front end.
Establish a websocket bridge between the web app and rosbridge to exchange messages with ROS ecosystem. Create a Connection component that displays the web app's connection status to the bridge.
Learn how React state enables dynamic UI by creating a counter with a state variable and setState, then use the concept to indicate robot connectivity with green or red alerts.
Create the connection component within the components folder, import and define the connection class, and render it to verify the UI updates and resolve the undefined connection error.
Import the roslib dependency to enable web-based navigation with rosbridge, choosing local script imports over npm for reliable websocket communication between the web app and ROS.
Display the robot's connection status with a bootstrap alert for connected or disconnected. Bind a state variable defaulting to false and use a green or red variant to reflect status.
Develops the connection logic for a web-based ROS interface using roslib and React state, subscribing to connection events and updating state when the robot connects or disconnects.
Learn to connect to rosbridge over websocket by configuring the ip and port, invoking the connect method, and handling connection events to reflect online status and auto-reconnect after disconnection.
Implement an automatic reconnection strategy for a web app using a timeout that retries reconnecting to ROSBridge every three seconds, ensuring the robot's connected state updates automatically.
Learn to replace hardcoded connection values with a config file by importing a config object that defines parameters like the server IP, bridge port, and reconnection timer to simplify maintenance.
Develop and visualize a daily operation teleoperation component that sends messages to the bridge, which transfers them to the ecosystem to move the robot, using boilerplate code.
Create a bootstrap grid layout in a React app using a container, rows, and columns to organize connection and daily operation components, with a placeholder for the map.
Develop a React joystick component to send velocity commands via ROSBridge, implementing move and stop handlers that publish angular and linear velocities for web-based robot navigation.
Implement joystick control by publishing linear velocity for forward motion and angular velocity for turning, and publish a zero twist to stop using a publisher and twist message to rosbridge.
Set up a cmd_vel publisher inside handleMove, configure the velocity topic via a config object, and ensure publisher initialization across components for ROSBridge web-based navigation.
Create a twist message with linear and angular components, set linear x and angular values, and publish it via ROSLib to control a robot’s movement from a joystick with throttle.
Discover how the event property of the react joystick component fires when you adjust the throttle, reporting movement in both horizontal and vertical directions for web-based navigation.
Learn to map joystick events to smooth velocity commands for ROSBridge navigation by scaling vertical and horizontal inputs, producing proportional linear and angular motion with automatic stop.
Publish a zero velocity message to stop the robot, bind the stop keyword, and test the handle stop method from the web browser to control movement.
Set up the more advanced turtle boucherie simulator and visualize the robot's position, orientation, and velocities in the web browser, including loading a map and running the navigation stack.
Test teleoperation of a Turtlebot3 via ROSBridge, adjusting topic names with a config file and resolving manifest errors, then visualize position and quaternion orientation from odometry in the browser.
Develop a ReactJS class component named robot state, defining position (X, Y, orientation) and velocity (linear, angular), and prepare a subscribe mechanism to visualize live updates.
Create a position subscriber and visualize the robot's pose on the map in real time using rosbridge, with topic setup, message handling, and a two-decimal display.
Convert the orientation quaternion to roll, pitch, and yaw, and express angles in degrees. Use three.js to implement the conversion and visualize the robot's position and orientation in the browser.
Create a subscriber for velocities by configuring a topic, subscribing to twist messages, and updating the robot's linear velocity and angular velocity in real time through a callback.
Visualize the map by subscribing to the map topic and drive the robot on the map by using the robot pose published and overlaid in the web browser.
Create and integrate a new map component by wiring boilerplate map class code, importing and exporting it, and subscribing to the map topic to visualize the map image.
Initialize a ROS connection in the map component by creating a bridge connection, defining state variables, and using componentDidMount to visualize the map topic in the web browser.
Import and configure the map visualization and navigation libraries in a ROSBridge project, place them in public resources, update index.html, and subscribe to the map to render the web interface.
Visualize the map in a web browser by creating a viewer, configuring a navigation client with an occupancy grid, and connecting to the navigation stack server to send navigation goals.
Reorganize the web-based robot interface by placing the map in the same row as the robot state, displaying the position and velocity (linear and angular) together.
Visualize the robot position on the map by publishing the robot pose from the robot state publisher, enabling a web-based navigation viewer to subscribe to the pose.
Welcome to the course on ROS for Beginners III Web-based Navigation with ROSBridge. I am Anis Koubaa, and I will be your instructor in this course. This course is the third course in the series ROS For Beginners. It is a project-based course that deals with how to develop a web interface to teleoperate and interact with ROS-enabled robots.
Project Overview
At the end of this course project, you will develop a web interface that will allow you to teleoperate and monitor the robot based on ROS. The Web interface will be developed using ReactJS, which is a popular JavaScript framework for front-end development.
We will first start by developing a component that will tell us whether the robot with which we would like to communicate is connected or not connected. Then, you will develop another component to teleoperate the robot through a web-based joystick in ReactJS. You also implement a button for stopping the robot in an emergency situation. Furthermore, the web interface will display live information about the robot such as its position, orientation, and linear and angular velocity. The last part of this project deals with map-based navigation. You will be able to display the navigation map on the web browser and send the goal location for the robot to navigate to. In the end, you will develop a comprehensive web interface that will allow you to interact with your robot easily through a web interface using the most popular JavaScript framework, which is ReactJS.
Why this course?
This course represents a first step into the world of cloud robotics.
Cloud robotics is an emerging topic in the last few years and it aims at integrating mobile robots with cloud computing systems and the Internet of Things through web services interfaces.
Besides, I have developed this course because there are not sufficient pointers and no comprehensive tutorials on how to make web browsers interact with robots.
What's worth in this course?
This course is unique in the sense that it is designed to Bridge the gap between the robotics world and the web development world.
In fact, most of the engineers who work in the robotic area do not have a background in web development, and most of the web developers do not have a background on robots or ROS. This course bridges these two areas together and provides a systematic introduction to the topic of web development for ROS-enabled robots.
Furthermore, we will use the ReactJS web development technology which the most evolving most popular javascript front-end development framework.
You will learn all the tricks in a step-by-step approach to help you save plenty of time looking around for scattered documentation.
Pre-requisites
To take the most benefit from this course, you should be already familiar with Robot Operating System (ROS) and its navigation stack. If you are not familiar with ROS, then take by two courses ROS For Beginners I and ROS For Beginners II before diving into this course.
As we will do some web development, it will be recommended to have some very basic understanding of HTML, CSS, and JavaScript, just basics and nothing advanced. You can take any introduction about HTML, CSS, and JS if you do not know about them.
It is not required that you have any Prior knowledge of ReactJS because I will introduce all the essential concepts in this course.
Welcome to the course and I wish you a pleasant learning experience.