click to edit master text styles - sdq webserver · click to edit master title style • click to...

19
Click to edit Master title style Click to edit Master text styles Second level Third level Fourth level G. Hinkel, H. Groenda, L. Vannucci, O. Denninger, N. Cauli, S. Ulbrich L’Aquila, 21-JUL-2015 A Domain-Specific Language (DSL) for Integrating Neuronal Networks in Robot Control

Upload: others

Post on 19-May-2020

18 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

G. Hinkel, H. Groenda, L. Vannucci, O. Denninger, N. Cauli, S. Ulbrich

L’Aquila, 21-JUL-2015

A Domain-Specific Language (DSL) for Integrating Neuronal Networks

in Robot Control

Page 2: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Motivation Platform Python DSL Formal Model Transformation Conclusion

Bio-inspired robots

• Robots inspired by nature

• Desire to create biologically plausible robot controllers

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 2

[Roe14]

Page 3: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Motivation Platform Python DSL Formal Model Transformation Conclusion

Connecting Robots to Neuronal Networks

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 3

?

[Image: extremetech.com]

[Image: FZI]

Page 4: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Motivation Platform Python DSL Formal Model Transformation Conclusion

The Human Brain Project

• Unify understanding of the (human) brain – Provide ICT platforms

• Transfer this knowledge into products – Future Neuroscience

– Future Medicine

– Future Computing

• Interdisciplinary cooperation

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 4

Page 5: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Motivation Platform Python DSL Formal Model Transformation Conclusion

The Neuro-Robotics Platform (NRP)

Closed Loop

Engine

Transfer Functions

World Simulator (Gazebo)

Transfer Functions

Neuronal Simulator

(Nest)

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 5

Camera images, Sensors

Control messages Membrane potentials

Network stimuli

Page 6: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Motivation Platform Python DSL Formal Model Transformation Conclusion

The NRP in action

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 6

Page 7: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Motivation Platform Python DSL Formal Model Transformation Conclusion

A basic example experiment

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 7

[Brai86] [Image: Clearpath robotics]

EyeSensorTransmit

WheelSensorTransmit

Page 8: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Motivation Platform Python DSL Formal Model Transformation Conclusion

Components of a running simulation

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 8

Page 9: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Motivation Platform Python DSL Formal Model Transformation Conclusion

Designing a DSL

• General-purpose language inappropriate [Fow10]

• Developers do not voluntarily change their primary language [MR13]

• Python popular among neuroscientists & roboticists – Goal to make DSL familiar to Python developers

• No limit for expressiveness in the Transfer Functions – Internal Python DSL

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 9

Page 10: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Motivation Platform Python DSL Formal Model Transformation Conclusion

A Transfer Function for the example

from geometry_msgs.msg import Vector3, Twist

def wheel_transmit(t, left_wheel_neuron, right_wheel_neuron):

linear = Vector3(20 * min(left_wheel_neuron.voltage, right_wheel_neuron.voltage), 0, 0)

angular = Vector3(0, 0, 100 * (right_wheel_neuron.voltage - left_wheel_neuron.voltage))

return Twist(linear=linear, angular=angular)

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 10

Import Transfer Functions Framework

Mark Python Function as Transfer Function

Mapping of parameters to neurons

import hbp_nrp_cle.tf_framework as nrp

@nrp.MapSpikeSink("left_wheel_neuron",

nrp.brain.actors[0], nrp.leaky_integrator_alpha)

@nrp.MapSpikeSink("right_wheel_neuron",

nrp.brain.actors[1], nrp.leaky_integrator_alpha)

@nrp.Neuron2Robot(Topic('/husky/cmd_vel', Twist))

Page 11: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Motivation Platform Python DSL Formal Model Transformation Conclusion

Approaching a formal model

• Neuroscientists often do not have programming expertise

• Efficient failure management – Decreased time for errors reporting

– Increased locality for errors

• Abstract syntax for graphical editor

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 11

Page 12: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Motivation Platform Python DSL Formal Model Transformation Conclusion

Combination of DSLs on multiple abstraction levels

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 12

Page 13: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Motivation Platform Python DSL Formal Model Transformation Conclusion

Using the formal model

• Transformation of Transfer Functions – Simulation component (CLE) only needs single

input format

– Expert users can trace the transformation

• Formal model may contain references to Transfer Functions in Python DSL

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 13

Page 14: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Motivation Platform Python DSL Formal Model Transformation Conclusion

A Transfer Function for the example

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 14

import hbp_nrp_cle.tf_framework as nrp

from geometry_msgs.msg import Vector3, Twist

@nrp.MapSpikeSink("left_wheel_neuron",

nrp.brain.actors[0], nrp.leaky_integrator_alpha)

@nrp.MapSpikeSink("right_wheel_neuron",

nrp.brain.actors[1], nrp.leaky_integrator_alpha)

@nrp.Neuron2Robot(Topic('/husky/cmd_vel', Twist))

def wheel_transmit(t, left_wheel_neuron, right_wheel_neuron):

linear = Vector3(20 * min(left_wheel_neuron.voltage, right_wheel_neuron.voltage), 0, 0)

angular = Vector3(0, 0, 100 * (right_wheel_neuron.voltage - left_wheel_neuron.voltage))

return Twist(linear=linear, angular=angular)

Page 15: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Motivation Platform Python DSL Formal Model Transformation Conclusion

Conclusion

• Internal DSL in Python for Transfer Functions – Raises abstraction level of the platform

– Familiar for Python users

• Formal model for integrating neuronal networks with robot control – Advantages in model validation

– Enabling artifact for graphical editor

• Support of both abstraction levels – Transformation approach

– Allow expert users to use Python DSL

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 15

Page 16: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Motivation Platform Python DSL Formal Model Transformation Conclusion

Outlook

• Validation in more realistic scenarios – Platform will go live soon

– Collection of user feedback

• Graphical DSL – Abstract syntax already existing

– Support users with little programming expertise

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 16

Page 17: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Thank you for your attention

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 17

[email protected]

Page 18: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

Motivation Platform Python DSL Formal Model Transformation Conclusion

Conclusion

• Internal DSL in Python for Transfer Functions – Raises abstraction level of the platform

– Familiar for Python users

• Formal model for Integrating neuronal networks with robot control – Advantages in model validation

– Enabling artifact for graphical editor

• Support of both abstraction levels – Transformation approach

– Allow expert users to use Python DSL

21.07.2015 Georg Hinkel et al. - A Domain-specific Language for Integrating Neuronal Networks in Robot Control 18

Page 19: Click to edit Master text styles - SDQ Webserver · Click to edit Master title style • Click to edit Master text styles – Second level • Third level – Fourth level G. Hinkel,

Click to edit Master title style

• Click to edit Master text styles – Second level

• Third level – Fourth level

References

[Roe14] A. Roennau, G. Heppner, M. Nowicki, and R. Dillmann, „LAURON V: a versatile six-legged walking robot with advanced maneuverability,” in Advanced Intelligent Mechatronics (AIM), 2014 IEEE/ASME International Conference on, IEEE, 2014, pp. 82-87.

[Völ06] M. Völter, T. Stahl, J. Bettin,A. Haase, S. Helsen, and K. Czarnecki, Model-Driven Software Development: Technology. 2006

[Brai86] V. Braitenberg, Vehicles: Experiments in synthetic psychology. MIT press, 1986

[MR13] L. A. Meyerovich and A. S. Rabkin, “Empirical analysis of programming language adoption” in Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications, ACM, 2013, pp. 1-18

[Fow10] M. Fowler, Domain-specic languages. Pearson Education, 2010.