Developed by Cyberbotics, Webots has gained immense popularity and transitioned into an open-source platform in December 2018, enabling a diverse community of experts to leverage its capabilities. Webots provides physically accurate and photo-realistic virtual environments without the need for specialized hardware. Some other simulators such as NVIDIA’s ISAAC Sim, require Nvidia’s RTX GPUs, something that not every robotics developer might have access to.
In earlier articles, we explored the benefits of using simulations in robotics application development and the integration of gaming engines like Unity with ROS/ROS2. In this article, we will delve into Webots, a widely used simulator in the robotics world. We present its user-friendly interface, some core concepts, integration with ROS2, and delve into the challenges encountered while using the SLAM-Toolbox with a LiDAR sensor.
Robots, Worlds, and ROS Interface
The bulk of our work at Black Coffee Robotics involves working with autonomous industrial arms and mobile robots. While there are several metrics for considering a given simulator, our interest was in evaluating the world and robot models, available sensors, ease of installation/use, and ROS(2) integration in the context of an industrial use case.
Worlds and Models
One of the primary targets for Webots is researchers and it is apparent in their arsenal of pre-built robots. In addition to wheeled robots, they also provide ready-to-build applications on top of provided hexapods, humanoids, and even salamanders.
Sample Webots worlds are fairly diverse too with homes, warehouses, uneven terrain, highways, and several others in the mix. Most (if not all) indoor worlds however were pretty small in dimensions though. This is in contrast to several Gazebo worlds that some developers are typically familiar with.
Sensors and Actuators
In addition to all the standard sensors such as LiDAR, Cameras, and IMU, Webots allows users to write their custom plugins. A full list of sensors is here. The list of actuators supported is quite interesting. Apart from linear and rotational actuators, there is in-built support for propellers, speakers, display TV, and several more.
ROS Integration in Webots
The primary mode of ROS or ROS2 integration with Webots is through official repositories, webots_ros, and webots_ros2. These allow the user to either integrate sensor interfaces using familiar URDFs (by using an additional <webots> tag, such as here) or via writing a custom plugin in C++ or Python.
SLAM-Toolbox with a Lidar on a MIR100 Robot
One of the key requirements in several robotics projects is to map and navigate in an environment. In one of our endeavors, we employed the SLAM toolbox on a Webots robot, specifically the MIR100 model. Webots already has a MIR100 model, so it wasn’t too tricky to add a ROS2 interface utilizing the differential drive plugin and sensor plugins for 2D LiDAR.
The LiDAR simulation came with some unexpected set of problems, unfortunately. There was a significant delay between the robot’s motion and LiDAR’s measurement update. This discrepancy meant that we could never get a working map out of Webots (we used SLAM Toolbox for this purpose). The mapping performance was slightly better at extremely slow speeds such as shown in the video above. Alongside being impractical, the output wasn’t up-to the mark. In the past, we have had great success using SLAM Toolbox with Gazebo, even at much higher speeds.
This behavior was consistent across various robot models such as tiago_iron, turtlebot3, and others. The maintainers of the webots_ros2 repository acknowledge that there is a known problem with the SLAM-Toolbox in Webots, their resolution however wasn’t clear or applicable.
Webots is a promising simulation platform that offers an intuitive user interface, photo-realism, a wide array of sensors, actuators, and interfaces to implement several levels of customization. While the repertoire of worlds and robot models is not as large as simulators such as Gazebo, the robot models and worlds that it does provide are unique. Some of these are more relevant to researchers in locomotion than perhaps industry users. The repository is actively maintained but in our experience, there remain unresolved issues, at least in the open source domain. For users interested in photo-realistic simulations without investing heavily in NVIDIA hardware, Webots should be a primary consideration. If you are looking to create large scale simulations for your use case, and need external help — reach out to us!