Search
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.
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.
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.
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 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).
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.
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.
git clone https://github.com/rustlluk/pycub
cd pyCub && mkdir venv && cd venv && virtualenv . && source bin/activate && pip3 install numpy scipy pybullet open3d
export PYTHONPATH=$PYTHONPATH:/home.nfs/your_ctu_username/pyCub/icub_pybullet
You will need to run source /home.nfs/your_ctu_username/pyCub/venv/bin/activate every time you open new terminal
source /home.nfs/your_ctu_username/pyCub/venv/bin/activate
#!/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
chmod +x /home.nfs/your_ctu_username/set_env.bash
ssh your_ctu_username@taylor.felk.cvut.cz
singularity pull docker:/ /b3m33hro/labs:local
exit
singularity run –nv labs-local.img
/home.nfs/your_ctu_username/set_env.bash