Table of Contents
Fetching ...

Learning with pyCub: A Simulation and Exercise Framework for Humanoid Robotics

Lukas Rustler, Matej Hoffmann

TL;DR

pyCub provides a Python-based, open-source physics simulation of the iCub humanoid with a full articulation and a 4000-sensor artificial skin, designed to lower barriers to hands-on learning in humanoid robotics. Built on PyBullet, it offers joint, velocity, and Cartesian control modes, a custom GUI, and fully YAML-configurable experiments, with ready-made exercises spanning basic movements to gaze, reactive control, and grasping. Validated in two course runs, pyCub demonstrates improved accessibility over traditional iCub simulators that require C++ and YARP middleware, enabling students to focus on robotics rather than middleware. By offering easy installation (PyPI, Docker, GitPod) and Python-only control, pyCub facilitates rapid experimentation and paves the way for future extensions to planners, ROS interfaces, and more advanced topics like walking or event-based sensing.

Abstract

We present pyCub, an open-source physics-based simulation of the humanoid robot iCub, along with exercises to teach students the basics of humanoid robotics. Compared to existing iCub simulators (iCub SIM, iCub Gazebo), which require C++ code and YARP as middleware, pyCub works without YARP and with Python code. The complete robot with all articulations has been simulated, with two cameras in the eyes and the unique sensitive skin of the iCub comprising 4000 receptors on its body surface. The exercises range from basic control of the robot in velocity, joint, and Cartesian space to more complex tasks like gazing, grasping, or reactive control. The whole framework is written and controlled with Python, thus allowing to be used even by people with small or almost no programming practice. The exercises can be scaled to different difficulty levels. We tested the framework in two runs of a course on humanoid robotics. The simulation, exercises, documentation, Docker images, and example videos are publicly available at https://rustlluk.github.io/pyCub.

Learning with pyCub: A Simulation and Exercise Framework for Humanoid Robotics

TL;DR

pyCub provides a Python-based, open-source physics simulation of the iCub humanoid with a full articulation and a 4000-sensor artificial skin, designed to lower barriers to hands-on learning in humanoid robotics. Built on PyBullet, it offers joint, velocity, and Cartesian control modes, a custom GUI, and fully YAML-configurable experiments, with ready-made exercises spanning basic movements to gaze, reactive control, and grasping. Validated in two course runs, pyCub demonstrates improved accessibility over traditional iCub simulators that require C++ and YARP middleware, enabling students to focus on robotics rather than middleware. By offering easy installation (PyPI, Docker, GitPod) and Python-only control, pyCub facilitates rapid experimentation and paves the way for future extensions to planners, ROS interfaces, and more advanced topics like walking or event-based sensing.

Abstract

We present pyCub, an open-source physics-based simulation of the humanoid robot iCub, along with exercises to teach students the basics of humanoid robotics. Compared to existing iCub simulators (iCub SIM, iCub Gazebo), which require C++ code and YARP as middleware, pyCub works without YARP and with Python code. The complete robot with all articulations has been simulated, with two cameras in the eyes and the unique sensitive skin of the iCub comprising 4000 receptors on its body surface. The exercises range from basic control of the robot in velocity, joint, and Cartesian space to more complex tasks like gazing, grasping, or reactive control. The whole framework is written and controlled with Python, thus allowing to be used even by people with small or almost no programming practice. The exercises can be scaled to different difficulty levels. We tested the framework in two runs of a course on humanoid robotics. The simulation, exercises, documentation, Docker images, and example videos are publicly available at https://rustlluk.github.io/pyCub.

Paper Structure

This paper contains 16 sections, 2 equations, 4 figures, 2 tables.

Figures (4)

  • Figure 1: An example of the simulation environment showing the iCub humanoid robot, a table, a green ball that can be manipulated by the robot, and a robotic skin (red points in the left image). The output from the left eye (in the right image) shows a successful grasp.
  • Figure 2: Schematic of the simulation package and interconnections between individual modules. The arrow heads indicate the direction of communication.
  • Figure 3: Example of native gui with output from both eyes and additional visualization showing vectors where the robot is looking (blue) and where it should be looking (red) used in the gaze exercise.
  • Figure 4: Examples of skin activations (green points) when a ball is touching the skin. The view is rotated such that the area "under" the ball is visible.