Exercises on Evolutionary Robotics for JdeRobot Robotics Academy
The libraries and exercises are developed and tested in Python 2.7.17, Pip 20.0.2, ROS Melodic, Ubuntu 18.04.
The instructions to install Git(command terminal) for Ubuntu 18.04 are:
- Update the Default Packages
sudo apt update
- Install Git
sudo apt install git
- Check if the following command does not give a missing error
git
The instructions to install Python2.7 for Ubuntu 18.04 are:
- Update and Upgrade the Default Packages
sudo apt update
sudo apt upgrade
- Install Python2.7
sudo apt install python2.7
- To check correct installation, the following command should open a Python interpreter
python2
- Install Pip for Python2
sudo apt install python-pip
- Check if the following command does not give a missing error
pip
Follow the Installation instructions as given on the Robotics Academy webpage.
The installation is done correctly if we can successfully run the following commands:
- Source the environment variables
source ~/.bashrc
- Start the ROS Master server. This would keep running in the terminal without giving any errors
roscore
- The Gazebo Model variable should contain paths to jderobot directories
echo $GAZEBO_MODEL_PATH
The project uses the following python modules
numpy==1.16.5
graphviz==0.14
matplotlib==2.1.0
The libraries developed for the project are available in libraries. These libraries are useful for solving the exercises. The API reference and examples are also provided.
Before running the installation, make sure that all the prerequisites are already installed on the system which are Git, Python, Pip and Generic Infrastructure of Robotics Academy.
-
Open a new terminal and navigate to the directory where the exercises should be downloaded.
-
Clone the Github Repository.
git clone https://github.com/TheRoboticsClub/colab-gsoc2020-Sakshay_Mahna
- Navigate to the working directory inside the cloned repository.
cd colab-gsoc2020-Sakshay_Mahna/evolutionary_robotics
- Update Pip to the latest version. Some dependencies need the latest version to install correctly.
pip install --upgrade pip
- Install the dependencies. All the dependencies would be installed without giving any errors.
pip install -r requirements.txt
- Source the ROS environment variables.
source /opt/ros/melodic/setup.bash
- Run the installation script to configure the Gazebo Assets. This will build the workspace and make new directories
devel
andbuild
insidecolab-gsoc2020-Sakshay_Mahna/catkin_ws
directory.
. installation.bash
- Run the source script to source the Gazebo Assets. This command would add new paths to
GAZEBO_MODEL_PATH
environment variable.
. source.bash
- Specific instructions to run each of the exercises are given in their respective directories.
The code for this exercise is present in obstacle_avoidance
-
Speeding up the process: The current obstacle avoidance exercise takes 2 hours to train, which is acceptable for this exercise. However, scaling this to other exercises will be difficult as they would take even longer time.
-
Determinisim: Deterministic environment is important to help students debug and understand their mistakes. The current software is not deterministic, which also does not enable us to use elites.
-
Collision: After experiencing a collision, the robot model behaves in an errotic manner. This records errors in the sensor input and motor output, influencing the fitness value. This collision should be avoided or removed.
All of the above issues are mostly part of training. However, all of these problems could be solved using a minimalistic Physics Engine, which can be used to train the robot. The robot can then be tested on the real Gazebo simulator.