Context

Simulations remain essential in training many robot behaviors: they are faster, safer, cheaper and sometimes more useful. Yet, the paradox of never being able to fully simulate the richness of reality births the issue of The Reality Gap. Given this, how can we successfully transfer robot behaviors trained in simulation to perform reliably in the real world?

Why the Single-Legged Walker?

The lab that I was a part of primarily dealt with artificial life and simulations. I wanted to explore the Reality Gap on their simplest simulation: the Single-Legged walker.

Research aim

The most common approach proposed to the reality gap issue is some variant of adding noise to the simulation; yet a systematic study of just how one should do so remains less explored. Often, a gaussian distribution of seemingly arbitrarily determined parameters is just incorporated to some aspect of the simulation.

This was what motivated me to develop my research aim: a systematic study of what factors affect the transferability fo a robot from simulation to reality, and how.

First, some details

The Simulator: this was a python script which modelled the internal and external interactions of the walker robot.

The Control System: The brain of this walker was a Dynamic Neural Network: A continuous-time recurrent neural network to be specific. Why? Well, this kind of Neural Network is successfully able to model motor behaviours and handle time-series data.

The Training: The training algorithm was an evolutionary algorithm – something that mimics evolution in an attempt to train the Neural-Network in question. Traditional Back-propagation doesn’t really work with dynamic Neural-Nets; hence, this approach.

Research aim with more detail:

I wanted to craft a systemic exploration of noise added to the simulator that evolves Dynamic Neural Networks in directing the locomotion of a simulated single-legged walker robot.

RQ: How does the amount, location, and type of noise added affects the Reality Gap of optimized solutions.

The conclusions drawn from such research will serve useful in the conscientious designing of simulations to train robot behaviours that ensure a better transference to real-life.

Project overview

While simultaneously training my simulated walkers in permuted conditions, I had to construct a mechanical version of the walker to actually conduct my research. This post outlines my reification of the simulated robot in real-life to be able to test the evolved Neural-Network solutions for the locomotion of this robot in real-life.

Single-Legged Walker: the simulation model + conversion to RL

The model deals with a point mass that is the center of mass of the walker robot. It is attached to a leg of a parameterized length. It has three effectors:

  • The Foot Effector lifts the foot of the leg up and down as specified by its input from the neural network.
  • The Backward Swing Effector swings the foot backwards as specified by its input from the neural network
  • The Forward Swing Effector swings the foot forward as specified by its input from the neural network.

Both the Forward Swing Effector and Backward Swing Effectors can be looked at as antagonist muscle pair: they generate clockwise and counterclockwise torques about the leg’s single joint and they are summed to produce a resultant torque on the leg joint. If the foot is down, this generates a force on the body causing movement; if the foot is up, the leg simply swings and does not generate a force on the body.

I Implemented the collective mechanical motion of these three effectors using two servos. The first servo moved the leg up and down in a way that it either touched or didn’t touch the floor. The second moved the first servo and the leg about the axis parallel to the ground in accordance to the net torque that is fed into it from the micro- controller (which will run the Neural network controller)

Also, the model has one sensor:

  • The Angle Sensor reads the angle (from equilibrium) that the foot has swung and feeds it as a weighted input to each Neuron in the Neural Network.

I got this angle value from a feedback micro servo (that I used as the ‘second servo’ in the previous paragraph): this servo has an analog pin that reads in the angular displacement value of the servo.

In evolution/training, the ‘fitness measure’ – something that needs to be defined for the Evolutionary algorithm – was quantified by dividing the total distance walked by the robot by the testing duration . Now to measure the transfer success to real-life, the fitness measure needs to be calculated in real-life. I implanted a distance sensor on the walker that measures and logs the changing position of the walker to achieve this.

Finally, I’ll have to be able to run the evolved neural network controller to control the mechanical robot: I planned to use an Arduino to do so.

Overcoming Model Assumptions

  • The model assumes that the body of the walker moves in a straight line; yet the mechanics of the motion would actually cause the walker to move in a circular path (as the length of the leg remains constant throughout the motion). To overcome this issue, I included a linear rail to which the body of the walker was attached so that the motion of the walker is constrained to being linear.
  • The model also assumes frictionless motion of the body but the existence of friction between the foot and the ground (which will actually allow the walker to move). To overcome this:
    • The rail attached to the body contained ball bearings to minimize friction of the moving body
    • After some trial and error, making the robot foot with rubber in contact with an acrylic platform seemed to offer enough friction to move the robot body.

Design Process

I started off with some brainstorming and produced some rough sketches for what a plausible mechanical design for the robot could be like:

Rough Sketches

My drawings were difficult to discern (I aint no artist). To aid the process of proposals and presentations to my mentors and collaborators, I made an not-to-scale orthographic drawing of my model on tinkerCAD.

Better Illustrated Rough Sketches

Final Model

After some 3D printing, PCB design, Laser Cutting, Drilling, Gluing, Coding, and adding some additional stopping capabilities… This is what resulted:

Demo Video

Gratitudes

This work was greatly supported by my research mentor, Professor Eduardo Izquierdo, as well as Professor Randal Beer whose extensive research on adaptive dynamical systems heavily buttressed my project (it was his mathematical and simulation models for the single-legged walker that was used in my work). I’d also like to thank fellow lab-mate, Derek Whiteley, and my prototyping class instructor, Mathew Francisco for lending their support on the hardware end of this project.

Also, if anyone’s is interested, here’s a great introductory resource on Evolutionary Robotics [to demystify any jargon I may have used in this post as well as to understand some motivation behind my work]: https://www.frontiersin.org/articles/10.3389/frobt.2015.00004/full

Extra Tid-Bits

An extremely wordy research poster – definitely something to be improved on:

Midwestern Undergraduate Cognitive Science Conference slides with transcript – sadly, I don’t have a recording of the prez.

Comments are closed