Optimising compliant robot locomotion using the HBP Neurorobotics platform

If we want robots to become a part of our everyday life, future robot platforms will have to be safe and much cheaper than most useful robots are now. Safety can be obtained by making robots compliant using passive elements (springs, soft elastic materials). Unfortunately, accurate mechanical (dynamic/kinematic) models of such robots are not available and in addition, especially when cheaper materials are used, their dynamical properties drift over time because of wear.

Therefore, cheap robots with passive compliance need adaptive control that is as robust as possible to mechanical and morphological variations. Adaptation training on each physical robot will still be necessary, but this should converge as quickly as possible.

The Tigrillo quadruped robot will be used to investigate neural closed loop motor control for locomotion to address these issues. In particular, we want to investigate how the NRP simulation framework can be used to develop such robust neural control.

As a first step, we implemented a parameterised Tigrillo simulation model generator. Using a simple script, a Gazebo simulation model with given body dimensions, mass distributions and spring constants can be generated to be simulated in the NRP. We then implemented evolutionary optimisation (CMA-ES) in the NRP’s Virtual coach to find efficient motor control patterns, which then generated with spiking population networks using a reservoir computing approach. Finally, these control patterns were transferred to the physical robot’s SpiNNaker board and the resulting gaits were compared to the simulation results.

These steps are illustrated in the video below.

Next steps are:

  • to tune the parameter ranges of  the Tigrillo generator to those that are realistic for the real robot;
  • to implement sensors on the physical robot and calibrate equivalent simulated sensors;
  • to use our setup to obtain the desired robust closed loop control and validate both qualitatively and quantitatively on the physical robot.

Many thanks to Gabriel Urbain, Alexander Vandesompele, Brecht Willems and prof. Francis wyffels for their input.

 

Advertisements

How we simplify your neurons ?

Reproducing complex behaviors of a musculoskeletal model such as rodent locomotion, requires the creation of a controller able to process high bandwidth of sensory input and compute the corresponding motor response.
This usually entails creating large scale neural networks which in turn result in high computational costs. To solve this issue, mathematical simplification methods are needed to capture the essential properties of these networks.

One of the most crucial steps in mouse brain reconstruction is the reduction of detailed neuronal morphologies to point neurons. This is however not trivial, as these morphologies are not only needed to determine the connectivity between neurons by providing contact points, but also by allowing the computation of the propagation of the current through your cell.
This requires however the computation of the potential of every dendritic and axonal sub-sections.

A new model is thus needed that us computationally lighter but generic enough to capture all possible dynamics observed in detailed models.
Recent work by Christian Pozzorini et al. [1] tried to address this issue by creating a General Integrate and Fire (or GIF) point neuron model. This was done by optimizing neuronal parameters by using activities, and input currents.
The GIF model captures more dynamics of biological neurons than the classical Integrate and Fire (or IaF) model, such as stochasticity of spiking or spike-triggered current. However, it still cannot reproduce all dendritic dynamics observed in detailed models.

Simplification_Pozzorini

As a result, Rössert and al. [2] created an algorithm to reduce the synaptic and dendritic processes, by creating cluster of receptors. Each receptor receives multiple currents and treats them using linear filtering. This point neuron model is therefore not only one of the most biologically accurate that exists, but is also faster than a detailed counterpart. This is crucial for large scale simulations.

Simplification_Rossert

Simplification of neuron models is a way to extract the base dynamics of your neurons to simulate only what is needed. It is also an important indicator of the information that get lost in the process. It will be therefore a required step in our project in order to simulate the whole mouse brain and indeed, we will use these models in our project of  closed-loop simulation with the rodent body.

[1] Pozzorini, C., Mensi, S., Hagens, O., Naud, R., Koch, C., & Gerstner, W. (2015). Automated High-Throughput Characterization of Single Neurons by Means of Simplified Spiking Models. PLOS Computational Biology PLoS Comput Biol, 11(6).

[2] Rössert, C., Pozzorini, C., Chindemi, G., Davison, A. P., Eroe, C., King, J., … Muller, E. (2016). Automated point-neuron simplification of data-driven microcircuit models.

OpenSim support in the Neurorobotics platform

A key area of research of the Neurorobotics Platform (NRP) is the in-silico study of sensormotor skills and locomotion of biological systems. To simulate the physical environment and system embodiments, the NRP uses the Gazebo robotics simulator.

To perform biologically significant experiments, Gazebo has however been lacking an important feature until now: The ability to model and simulate musco-skeletal kinematics.

Therefore researchers had to rely on ad-hoc implementations calculating effective joint torques for the system at hand, wich is time consuming, error prone and cumbersome.

The physics plugin we implemented provides OpenSim as an additional physics engine alongside the physics engines already supported by Gazebo (ODE, Bullet, SimBody and DART). OpenSim is using SimBody as its underlying framework, thus featuring a stable and accurate mechanical simulation. The OpenSim plugin supports many of SimBody’s kinematic constraint types and implements collision detection support for sphere, plane and triangle mesh shapes along with corresponding contact forces (as exposed by OpenSim’s API).

However, first and foremost it treats physiological models of muscles as first class citizens alongside rigid bodies and kinematic joints. OpenSim is shipped with a number of predefined muscle-tendon actuators. Currently, users of our plugin can use OpenSim’s native XML configuration file format to specify the structure and properties of muscle-tendon systems, which are created on top of Gazebo models specified in Gazebo’s own file format (SDF).

A ROS-based messaging interface provides accessors for excitations and other biophysical parameters allowing to control musco-skeletal systems from external applications such as the Neurorobotics platform.

As demonstration of the capabilities of our physics plugin, we augmented a simple four-legged walker with a set of eight muscles (one synergist-antagonist pair per leg).

The problem we address in this demo is the reinforcement learning task of deriving a controller that excites the muscles in a pattern such that the walker is driven forward. Our setup consists of a Python application (remote-controlling Gazebo via the ROS-based messaging interface for the OpenSim plugin) performing the high-level optimization procedure and running a neural network (NN) controller.

We employ a simple genetic optimization procedure based on Python’s DEAP package to find parameters of the NN that maximize the score the walker obtains in individual trial runs.

The walker is rewarded for moving forward and penalized for unwanted motion behaviour (e. g. ground contacts of the walker’s body, moving off-center).

During a trial run, the physics simulation is stepped in small time increments, and during each iteration the NN is fed with various state variables. The NN’s output is comprised of excitation levels for the muscles. For simplicity we stuck to well-known artificial neural networks, implemented via the Tensorflow package.

We also experimented with fully dynamic grasping simulation using SimBody’s collision detection system and contact force implementations. Although the simulation setup for the grasping tests only comprised a simple two-jaw gripper and a cubic shape (consisting of a triangle mesh shape), the SimBody engine as used in our plugin was able to maintain a stable grasp using fully dynamic contact forces, tackling a problem that is notoriously difficult to solve with other physics engines.

Another application using the OpenSim plugin for Gazebo features a simplified muscle model of a mouse’s foreleg actuated by a neuronal controller modelled according the spinal cord of a real mouse. The details of this experimental setup will be covered in a separate blog post.

The OpenSim plugin does not support all of the features implemented with other engines in Gazebo. For instance, some joint types are not implemented yet. Also, some features unique to OpenSim (like inverse dynamics simulation) are not yet available in the current implementation.

To simplify the design of kinematic models with muscle systems and custom acutator models, it is planned to provide researchers and users of the NRP with a consistent, simple way to specify muscles via a graphical interface using the NRP‘s Robot Designer application.

A one-day workshop during the last Performance Show in Ghent

Last week, we had the chance to organize the first edition of a SP10 Performance Show in the city of Ghent, Belgium. This two-days meeting between all the partners involved in the HBP Neurorobotics subproject (SP10) was an opportunity to discuss the latest progress of each research groups and ensure a convergence of views and efforts for the next events, researches and developments.

 

SP10 Performance Show September 2017
A discussion during the SP10 Performance Show

 

On the second day, we divided our work into two tracks. Whereas the Main Track dealt with administrative and research activities, the Secondary Track was organized as a workshop on the theme Thinking the NRP of the Future. It was formatted as short one-day hackaton where everyone started by summarizing one or several iconic research advances that had been done in the last year in his field, which helped us grouping into 4 different work teams :

  • Reinforcement Learning with the NRP
  • Integrating worms brains and soft bodies in the NRP
  • Real-time interaction between real and simulated robots in the NRP
  • Helping research on visuomotor learning with the child using simulations in the NRP

 

SP10 Performance Show September 2017
On Tuesday, a work group is brainstorming about integrating worms in the NRP

 

Each of those teams brainstormed to imagine and design an experiment that could help research to move forward and a list of requirements in term of developments it would need to be achieved. After lunch, the results of this brainstorm were presented to everyone to get feedback and comments before we started working on designing a first prototype in the NRP and coding some useful models that we would need in further work. To be continued then…

First validation of the virtual M-Platform

The virtual model of the robotic platform has to accurately reproduce movements of the slide according to the applied force at different values friction force levels (FIG 1). The friction levels, that in the M-Platform are modulated with an actuated system, are reproduced on the virtual model regulating the friction coefficient of the slide. This study has been carried out as a joint work with the Prof. LASCHI’s group (SSSA, member of SP10).

FIG 1bis blog
(FIG 1) M-Platform on the Gazebo Simulator

We tested a pool of animals performing the pulling task on the real M-Platform in different conditions (i.e. increasing friction force levels to be overcome in order to perform the task). The animals performed a force through their forelimb trying to pull a slide back until a resting position. These real force signals have been used as inputs to the simulator to evaluate if the output monitored variables (i.e. the variation of position of the slide following the application of the force) could be comparable between real and simulated environment. Reasonable results for single pulling movements have been observed, whereas same synchronicity and  trend but less reproducibility have been seen for multiple movements (FIG 2).

We think that these results are due to the difficulties to model the inertial force of the linear slide acting on the real M-Platform, one-two order of magnitude lower than the friction force and the force performed by the animal. Indeed for high force peaks (resulting into single movements), the animals are able to complete the entire pulling movement (10 mm) and this is properly simulated in the NRP. However when the force peaks are lower in amplitude, in the real experiment the inertial force allows longer movements than the simulated ones. These latter are generated by the simulated model by means of the application of the force overcoming the friction level. Thus, whenever the force goes down this threshold, suddenly the movement is stopped not describing the real movement of the slide. Although the variation in position is different, the synchronicity of the movements and its trend continue being the same.

FIG 2 bis blog
(FIG 2) Two examples of the comparison between real and simulated experiments

In Figure 2 on the left a single force peak (red curve) overcoming the friction value (0.4N) is recorded during a real pulling task performed by a mouse on the M-Platform. The resulting variation of position is shown on the bottom left panel (red curve). The same real force has been used as input force acting on the handle-joint of the simulated M-Platform. This over-friction-threshold force (computed force, blue curve) can generate a simulated movement in the NRP model, as shown in the blue line on the bottom left panel, similar to the real position curve. On the right panels, multiple force peaks (red curve) overcoming the friction value (0.4N) are recorded during a real pulling task performed by a mouse on the M-Platform. Same procedure as previously described has been followed. In this case the trend is similar between real and simulated positions and the synchronicity between force peaks and movements is still present.

 

Development of an interface board to connect neuromorphic hardware with real world and simulated robots

Neuromorphic computing systems (e.g. SpiNNaker) allow real-time closed-loop robot control in simulation and real-world robots and fascilitate the use of neuromorphic sensors such as silicon retinae and silicon chochleae, because of the spiking nature of these systems.

To connect such neuromorphic hardware to the NRP, an interface board was developed to allow the communication of spikes between SpiNNaker and neuromorphic sensors and actuators.

The current systems allows for up to 500.000 events to be processed per second on five UART ports simultaneously, which is significantly faster compared to the Ethernet interface SpiNNaker provides with about 20.000 events per second.

The second iteration of the interface board will integrate communication via UART, SPI, CAN, and high-speed USB, while also increasing the throughput by using a more advanced microprocessor and optimised CPLD programming (Fig. 1).

IOBoard_2ndIt
Fig. 1: A prototype of the second iteration of the interface board currently in development.

Showcases of the interface board include connecting SpiNNaker to a 2 DOF MyoRobotics system (Fig. 2), a modular framework for the development of compliant musculoskeletal robots. The results of this experiment are published in [1], but research is still ongoing.

MyoRobotAndSpiNNaker_edited
Fig. 2: Example setup of the interface board with SpiNNaker and MyoRobotics 2 DoF arm [1].

Future work will include more showcases of real-world robots driven by neuromorphic hardware as well as the integration of these robots into the NRP, to make these robots accessible to a broader user base and to provide an infrastructure to enable researchers to test their control algorithms on real robots.

[1] RICHTER, Christoph, et al. Musculoskeletal robots: scalability in neural control. IEEE Robotics & Automation Magazine, 2016, 23. Jg., Nr. 4, S. 128-137.

Connecting the Laminart model to a retina modelling framework on the NRP

After having integrated a cortical model for visual segmentation to the NRP, we (Laboratory of Psychophysics, EPFL) connected it to a framework for retina modelling that was already integrated to the NRP. Early August, collaborating with SSSA, we could design a virtual experiment where the iCub robot performs a visual segmentation task, using both retinal and cortical model (see next figure).

AAA

The iCub robot performs a visual segmentation task, using the Laminart model. The goal is to detect the target (small tilted lines). This is only possible if the nearby flankers are segmented by the model. The retina model delivers its output to the Laminart model. This experiment was done to check the compatibility between both models. The scientific goals for this connection is to use the retina to deliver gain controlled input to the Laminart, to gain insights about how color information can be used by the Laminart model to create perceptual groups and to see how retinal magnification can have an influence on grouping. Left windows: output of the Laminart model (top: V2 activity – bottom: V4 activity) ; the model parses visual information into different perceptual groups, thanks to grouping mechanisms. Center windows: output of the retina model (ON- and OFF-centered ganglion cells activity). Right window: output of the brain visualiser, displaying all the neurons of the Laminart model (here: approximately 500’000 IaF neurons).

The future plan for this virtual experiment is to use the connection between the retinal and the cortical model to extend the predictions of the Laminart model to more general cases. For now, the model is the only one to explain many behavioural data about visual crowding (Francis, 2017 [1]), using grouping mechanisms, and it will be very interesting to see how color information is used by the visual system to group elements together. We will use data about crowding and color (Manassi, 2012 [2]) to validate the connection.

More in general, the NRP can be used to give a realistic framework to any model. For example, we tried to see how the Laminart model behaves in realistic conditions by adding some feedback, making the robot move its eyes towards the target when it is detected. The outcome was that the segmentation was not stable, if the bottom-up input was shifted by an eye movement. Using this, we designed a mechanism explaining how vision can generate non-retinotopic representation of objects (see next figure).

output2 (Converted)

The robot moves its eyes towards the target when detected. Each eye movement triggers new segmentation signals whose location adapt to the amplitude and the direction of the eye movements (low neuronal cost). Using this simple mechanism, the model can generate a non-retinotopic representation of the perceptual groups.


Citations:

  1. Francis, G., Manassi, M., Herzog, M. H. (2017). Neural Dynamics of Grouping and Segmentation Explain Properties of Visual Crowding, Psychological Review.
  2. Manassi, M., Sayim, B., & Herzog, M. H. (2012). Grouping, pooling, and when bigger is better in visual crowding. Journal of Vision12(10), 13-13.