Table of Contents

Humanoid robot programming

The first part of the subject aims to get you acquainted with programming of a humanoid robot. We will use a Python simulator of humanoid robot iCub.

Gaze

The exercise is to make the robot move to look at the ball using the information about the mutual angle of head-ball and gaze vectors. The exercise is constrained to be in “2D” by moving the neck pitch so that the gaze vector and vector from ball to head are in the same plane. It can be solved by moving one joint only.

Template and config can be downloaded here: gaze.zip.

PyBullet documentation can be useful and can be found here.

iCub Kinematics

This picture shows the joints of iCub with their names and indexes that can be used to control the robot in joint space in the PyCub simulator.

PyCub

The simulator is written in Python3 and uses PyBullet as a physics engine and Open3D for visualization. It should run without problem on any system with Python3 (it is tested in Python3.11; anything over 3.8 should be fine; the theoretical limit is 3.6 because of f-strings).

The whole documentation can be found here.

A presentation with a description of basic functionality can be found here.

Installation

Installation instructions can be found on Github or this presentation. But basically, you need to clone the repository and install dependencies: numpy, scipy, pybullet, open3d (and their dependencies).

Alternative installation (Docker)

You can also use a Docker container with all dependencies installed. You can use instruction on Github for PyCub specific docker, or you can use our HRO Docker. Our HRO Docker contains all you will need during the semester.

Alternative installation (Gitpod)

If you want to use cloud-based solution, you can easily open this link. You will get a cloud version of our Docker, that is ready to use in your browser.

Alternative installation (Lab computers)

Python only

You will need to run source /home.nfs/your_ctu_username/pyCub/venv/bin/activate every time you open new terminal

Docker (bit of a workaround, but should work)

#!/bin/bash unset LD_LIBRARY_PATH export GRASPIT=/home/docker/.graspit source /home/docker/ros_ws/devel/setup.bash export PYTHONPATH=$PYTHONPATH:/home.nfs/your_ctu_username/pyCub/icub_pybullet