Custom library eases programming of TurtleBot3 with webots code

Educational robotics beyond ROS: a custom library for direct transfer of Webots controllers in the Turtlebot3

Robotics

Summary

Programming robots can be hard because of complicated software like ROS. The authors created a simpler tool that lets students use the same Python code to control a robot both in a simulator and in real life. This custom library copies the programming style of the simulator Webots, so students don’t have to learn new commands for the real robot. The approach made it easier for students to focus on how the robot behaves rather than struggling with technical setup.

What this means in practice

  • For robotics instructors: Use the library to teach robotics programming with less setup complexity by enabling direct code transfer from simulation to real TurtleBot3 robots.
  • For robotics hobbyists: Program the TurtleBot3 using familiar Webots API commands without learning ROS, simplifying hands-on robot experimentation.

Authors

Jaime P. Pérez-Moro, Alejandro Romero, Hector Quintian, Francisco Bellas

Abstract

Robot Operating System (ROS) is becoming a standard in robotics courses at higher education, but its installation, configuration and distributed programming model can introduce a significant entry barrier in the new landscape of AI-based master and degree studies, where many students do not have a strong informatics background. This paper presents an educational experience that enables students to program a TurtleBot3 Burger directly in Python, while preserving a direct transfer path from simulation to the physical robot. The approach is based on a custom library that mirrors the Webots API, allowing the same controller code to be executed in the simulator and on the real TurtleBot3 with minimal modification. The library provides access to the robot motors, wheel encoders, inertial sensors and LiDAR, and is complemented by scripts that automate deployment and execution on the physical platform. It was used in a master-level course on introductory autonomous vehicles, and initial student feedback suggests that the approach reduces the perceived complexity of ROS-related infrastructure and helps learners focus on algorithmic logic and real-world behaviour.