• Aucun résultat trouvé

Program / simulation tools / ROS / Gazebo / OpenHRP

N/A
N/A
Protected

Academic year: 2021

Partager "Program / simulation tools / ROS / Gazebo / OpenHRP"

Copied!
62
0
0

Texte intégral

(1)

HAL Id: cel-02130166

https://hal.inria.fr/cel-02130166

Submitted on 15 May 2019

HAL is a multi-disciplinary open access

archive for the deposit and dissemination of

sci-entific research documents, whether they are

pub-lished or not. The documents may come from

teaching and research institutions in France or

abroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, est

destinée au dépôt et à la diffusion de documents

scientifiques de niveau recherche, publiés ou non,

émanant des établissements d’enseignement et de

recherche français ou étrangers, des laboratoires

publics ou privés.

Distributed under a Creative Commons Attribution - NonCommercial| 4.0 International

License

Program / simulation tools / ROS / Gazebo /

OpenHRP

Olivier Stasse

To cite this version:

Olivier Stasse. Program / simulation tools / ROS / Gazebo / OpenHRP. Doctoral. GdR Robotics

Winter School: Robotica Principia, Centre de recherche Inria Sophia Antipolis – Méditérranée, France.

2019. �cel-02130166�

(2)

Program/simulation tools

ROS/Gazebo/OpenHRP

O. Stasse, Gepetto,

LAAS-CNRS

Robotics Principia

(3)

Table of Contents

1

ROS

3

Simulator architecture

4

Dynamics engine

2

Simulators

5

Motivations - Scientific approach

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 2/47 Robotics Principia

(4)

Exemple: Asservissement visuel

3d-sensor

Visual

servoing

control

Kobuki

Nodelet

I

( v

w )

(5)

Exemple: Asservissement visuel - Topics

3d-sensor

Visual

servoing

control

Kobuki

Nodelet

/mobilebase/command/velocity /camera/im-age_color

I

( v

w )

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 4/47 Robotics Principia

(6)

Exemple: Asservissement visuel - Topics - Params

3d-sensor

Visual

servoing

control

Kobuki

Nodelet

/mobilebase/command/velocity /camera/im-age_color

(Kp, Kd

)

I

( v

w )

(7)

Exemple: Asservissement visuel - Software bus

3d-sensor

Visual

servoing

control

Kobuki

Nodelet

Software Bus (roscomm/rosmaster) - Handle rosnodes

rostopic rosparam

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 6/47 Robotics Principia

(8)

Motivations - Robotics application

Environnement

Signal

processing

Environment

modeling

Control

Motion

planning

Task

planning

OpenCV - PCL

OctoMap

KLD - iTask - SoT

MovIt

SMACH

PC - Vision

PC - Mapping

PC - Contrôle

PC - Motion Planning

PC - Task Planning

Bus

logiciel

(9)

Motivations - Robotics application - Tools

Environnement

Signal

processing

Environment

modeling

Control

Motion

planning

Task

planning

OpenCV - PCL

OctoMap

KLD - iTask - SoT

MovIt

SMACH

PC - Vision

PC - Mapping

PC - Contrôle

PC - Motion Planning

PC - Task Planning

Bus

logiciel

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 7/47 Robotics Principia

(10)

Motivations - Robotics application distributed

Environnement

Signal

processing

Environment

modeling

Control

Motion

planning

Task

planning

OpenCV - PCL

OctoMap

KLD - iTask - SoT

MovIt

SMACH

PC - Vision

PC - Mapping

PC - Contrôle

PC - Motion Planning

PC - Task Planning

Bus

logiciel

(11)

Motivations

Plumbery

Tools

Capacities

Ecosystem

The robotics community must collaborate to create

robotics systems of the same quality than in the

com-puter science and physics community.

ROS is the tool that allowed to scale-up.

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 8/47 Robotics Principia

(12)

Motivations - Plumbery

Middleware

Publication/subscription transmission on anonymous

messages (Message Passing)

Record and playback messages

Requests/answers using remote procedure calls

Distributed parameter server

(13)

Motivations - Tools

rviz

3D graphical interface

rosbag

Record and data visualizing

rxplot

Online viewing quantities

rxgraph

Graph application structure display

rqt

Incremental Graphical User Interface

catkin

Compiling and packages management system

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 10/47 Robotics Principia

(14)

Motivations - Tools

rviz

3D graphical interface

rosbag

Record and data visualizing

rxplot

Online viewing quantities

rxgraph

Graph application structure display

rqt

Incremental Graphical User Interface

(15)

Motivations - Tools

rviz

3D graphical interface

rosbag

Record and data visualizing

rxplot

Online viewing quantities

rxgraph

Graph application structure display

rqt

Incremental Graphical User Interface

catkin

Compiling and packages management system

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 10/47 Robotics Principia

(16)

Motivations - Tools

rviz

3D graphical interface

rosbag

Record and data visualizing

rxplot

Online viewing quantities

rxgraph

Graph application structure display

rqt

Incremental Graphical User Interface

(17)

Motivations - Tools

rviz

3D graphical interface

rosbag

Record and data visualizing

rxplot

Online viewing quantities

rxgraph

Graph application structure display

rqt

Incremental Graphical User Interface

catkin

Compiling and packages management system

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 10/47 Robotics Principia

(18)

Motivations - Ecosystem

Messages standardization for the robots

Model description language (even if imperfect)

Geometry - Dynamical libraries for robots

Preemptable remote procedure calls

Diagnostics

Pose estimation

Localization

Map building

Navigation

(19)

Motivations - Ecosystem

Operating Systems

Robots

Packages

Support :

Experimental :

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 12/47 Robotics Principia

(20)

Motivations - Ecosystem

Operating Systems

Robots

Packages

01/05/2014 : 111 Supported robots on http://wiki.ros.org/Robots 25/04/2017 : 27 Supported robots on http://wiki.ros.org/Robots 01/05/2014 : 2048 Supported packages on http://wiki.ros.org/Packages 25/04/2017 : 1400 Supported packages on http://wiki.ros.org/Packages

(21)

ROS: short history

2008

ROS started with Willow Garage

2010 - Jan

ROS 1.0

2010 - Mar

Box Turtle

2010 - Aug

C Turtle

2011 - Mar

Diamondback

2011 - Aug

Electric Emys

2012 - Mar

Fuerte Turtle

2012 - Dec

Groovy Galapagos

2013 - Feb

Open Source Robotics Fundation continues ROS

2013 - Aug

Willow Garage became Suitable Technologies

2013 - Aug

PR-2 Support is handled by Clearpath Robotics

2013 - Aug

Hydro Medusa

2014 - Jul

Indigo Igloo (EOL - Apr 2019)

2015 - May

Jade Turtle (EOL - May 2017)

2016 - May

Kinetic Kame (EOL - May 2021)

2017 - May

Lunar Loggerhead (EOL - May 2019)

2018 - May

Melodic Morenia (EOL - May 2023)

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 13/47 Robotics Principia

(22)

ROS: Release normalization

Lunar Loggerheard (May 2017- May 2019)

Ubuntu Xenial (16.04), Yakkety (16.10)

Ubuntu Zesty (17.04 LTS)

C++11, Boost 1.62, Lisp SBCL 1.2.4, Python 2.7 (tests against

Python 3.5 recommended) CMake 3.7.2

Ogre3D 1.9.x, Gazebo 7.5, PCL 1.8.0, OpenCV 3.x, Qt 5.7.1,

PyQt5 5.7

Melodic Morenia (May 2016 - May 2023)

Ubuntu Artful (17.10)

Ubuntu Bionic (18.04 LTS)

C++14, Boost 1.55, Lisp SBCL 1.3.14, Python 2.7 (tests against

Python 3.5 recommended), CMake 3.10.2

Ogre3D 1.9.x, Gazebo 9, PCL 1.8.1, OpenCV 3.2, Qt 5.9.5, PyQt5

5.10.1

Lien vers la ROS Enhancement Proposal (REPs) :

http://www.ros.org/reps/rep-0003.html

(23)

Tutorials ROS

Online exercices

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 15/47 Robotics Principia

(24)

What is a simulator ?

System simulators

 Simulate sensors, actuators, environment

 Smoothly going from simulation to real robot

 Accurate representation of reality

 Stability

Control simulator

Real-time



Catch the robot main dynamics



To be integrate inside the control loop



(25)

What is a simulator ?

System simulators

 Gazebo

 Stage

 Morse

 OpenHRP

Control simulator

MuJoCo



RBDL



Pinocchio



Robotran



[Ivaldi,ICHR,2014]

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 17/47 Robotics Principia

(26)

What is a simulator ?

System simulators

 Gazebo

 Stage

 Morse

 OpenHRP

Control simulator

MuJoCo



RBDL



Pinocchio



Robotran



[Ivaldi,ICHR,2014]

(27)

Problem 1: Reality



Impact



OpenHRP 2.x: 800 N



Real robot: 1300 N



Giving up speed



Compliant material



Dynamics



Vision

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 18/47 Robotics Principia

(28)

Problem 2: Software flexibility



From simulation to real robot



Being able to change parts of the simulator



Strong middleware

(29)

OpenHRP architecture

CORBA

Dynamics

Simulator

Model Loader

Collision

Detector

Scheduler

Controller

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 20/47 Robotics Principia

(30)

OpenHRP architecture

CORBA

ODE

Dynamics

Simulator

Model Loader

Collision

Detector

Scheduler

(31)

OpenHRP architecture

CORBA

UT Dynamics

Simulator

Model Loader

Collision

Detector

Scheduler

Controller

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 20/47 Robotics Principia

(32)

Global sequence - scheduler

Start

Reading torque from controllers

Build optimization problem

Direct dynamics with integration scheme

(33)

OpenHRP AIST Dynamics Simulator

Uses a mixture of generalized and maximal coordinates

formulation

The generalized coordinates are used to compute the robot

state.

This assumes a perfect rigid body dynamics (true for a high

PID control)

The maximal coordinates are used to compute the rest of

the world state.

Specific compliant joint are introduced in the direct

dynamics of the robot.

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 22/47 Robotics Principia

(34)

ODE: The problem

i -th body

- position,

quaternion

x , q

velocity

ν

˙

i

= [ ˙x

T

, ω

T

]

T

∈ R

dim(i )

force

F

i

∈ R

dim(i )

acceleration

ν

˙

i

then

M

i

ν

˙

i

= F

i

M ˙

ν = F

M

i

ν

˙

i

=

hm

0

i

δ

I

0

i

i h ¨

x

i

˙

ω

i

i

=

h

τ − ω × Iω

f

i

= F

i

[Hsu,Simpar,2014]

Definitions

(35)

ODE: The problem

[Hsu,Simpar,2014]

i -th constraint

h

e

(x , q) = 0, h

i

(x , q) ≥ 0,

Let us linearize constraints

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 24/47 Robotics Principia

(36)

ODE: The problem

[Hsu,Simpar,2014]

i -th constraint

h

e

(x , q) = 0, h

i

(x , q) ≥ 0,

speed

J

i 1

ν

1

+ · · · + J

ik

ν

k

+ · · · + J

in

ν

n

+ c

i

= 0

all together

J ˙

ν + c = 0 (1)

M ˙

ν = F

c

+ F

(37)

ODE: The problem

[Hsu,Simpar,2014]

i -th constraint

h

e

(x , q) = 0, h

i

(x , q) ≥ 0,

speed

J

i 1

ν

1

+ · · · + J

ik

ν

k

+ · · · + J

in

ν

n

+ c

i

= 0

all together

J ˙

ν + c = 0 (1)

M ˙

ν = F

c

+ F

with

F

c

= J

T

λ

then

M ˙

ν = J

T

λ + F

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 24/47 Robotics Principia

(38)

ODE: The problem

[Hsu,Simpar,2014]

i -th constraint

h

e

(x , q) = 0, h

i

(x , q) ≥ 0,

speed

J

i 1

ν

1

+ · · · + J

ik

ν

k

+ · · · + J

in

ν

n

+ c

i

= 0

all together

J ˙

ν + c = 0 (1)

M ˙

ν = F

c

+ F

with

F

c

= J

T

λ

then

M ˙

ν = J

T

λ + F

then with (1)

J (M

−1

J

T

λ + M

−1

F ) + c = 0

then

Aλ = b

with

A = JM

−1

J

T

et b = −(JM

−1

F

ext

+ c)

(39)

ODE: The problem

Joints when everythings goes well

Error Reduction Parameter

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 25/47 Robotics Principia

(40)

Tutorials

(41)

The problem

Costly, heavy,

not user friendly

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 27/47 Robotics Principia

(42)

The problem - The vision

Safety

Power

Humanoid Robot

for the factory

of the future

125 millions of holes drilled by year

(43)

The problem - The vision

Problem 1: Variability according to the customers

Problem 2: Variability in the realization (humans)

Problem 3: Variability in the delivery

Problem 4: Collaboration with humans

Problem 5: Certification

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 29/47 Robotics Principia

(44)

Behavior - Game theory

min f (

u(t), v(t))

g(u(t), v(t)) < 0

h(u(t), v(t)) = 0

The game score

Game and other

agent representation

Rules of the

game to constrain

the actions

(45)

Behavior - Game theory

min f (

u(t), v(t))

g(u(t), v(t)) < 0

h(u(t), v(t)) = 0

How to build the

cost function

for the behavior

of interest ?

How to build an

efficient world

representation ?

What are the

necessary and

meaningful

constraints ?

How to deal

with such a huge

search space ?

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 31/47 Robotics Principia

(46)

Approach

Control: Ensure adaptation

to local modification

Planning: Finding the new global

optimum and the basins of attraction

(47)

Autonomous Motion generation: the problem

min f (

u(t), v(t))

g(u(t), v(t)) < 0

h(u(t), v(t)) = 0

f(t): The cost function

u(t): The control vector

g(t): The inequality constraints

h(t): The equality constraints

v(t): The environment representation

[Saidi,IROS 2007]

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 33/47 Robotics Principia

(48)

Autonomous Motion generation: the problem

min

q(·),u(·)

R

T

0

L(t,

q(t), u(t))dt

˙

q(t) = f (q(t), u(t)), t ∈ [0, T ]

q(0) = q

0

, T > 0

0 ≤

gh(q(t), u(t)), t ∈ [0, T ]

f: The system dynamics

u: The control vector

q: The system state

gh: The (in)equality constraints

v: The environment representation

L: The cost

(49)

Motion generation: Model Predictive Control

t

CoM

u

Balance (under-actuated part)

GIK

∆T

∆T

∆T

∆T

∆T

∆T

∆T

∆T

∆T

∆T

Free-flyer

u

1

u

n 2

u

n

A general problem on the time window

 Size of the problem

1.6 × 200 × 30 = 9600 variables

 Non linear constraints

 Discrete nature due to contacts

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 34/47 Robotics Principia

(50)

MuJoCo [Koenemann, IROS 2015]

(51)

Structure de l’encapsulation

RCSotController JointHandle ImuSensorHandle ForceTorqueSensorHandle EffortJointInterface AbstractSotExternalInterface Robot Dyn Feature Task Solver WPG Desired Feature

Stack Of Tasks

PositionJointInterface Python ROS Real robot Gazebo LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 36/47 Robotics Principia

(52)

Software structure - Conceptual view

Robot

Dyn

Feature

Task

Solver

WPG

Desired

Feature

Python

IOR

ROS

: SoT Entity

: C++ server

: Process/Task

(53)

Software structure - Link with Model

Robot

Dyn

Feature

Task

Solver

WPG

Desired

Feature

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 38/47 Robotics Principia

(54)

Software structure - Link with Model

Robot

Dyn

Feature

Task

Solver

WPG

Desired

Feature

(55)

Software structure - Link with Model

Robot

Dyn

Feature

Task

Solver

WPG

Desired

Feature

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 40/47 Robotics Principia

(56)

Software structure - Link with Model

Robot

Dyn

Feature

Task

Solver

WPG

Desired

Feature

(57)

Software structure - Link with Model

Robot

Dyn

Feature

Task

Solver

WPG

Desired

Feature

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 42/47 Robotics Principia

(58)

Software structure - Link with Model

Robot

Dyn

Feature

Task

Solver

WPG

Desired

Feature

(59)

Software structure - Repositories

Robot

Dyn

Feature

Task

Solver

WPG

Desired

Feature

sot-hrp2

sot-dynamics

sot-core

sot-core

sot-dyninv

sot-core

sot-dyninv

sot-core

sot-pattern-generator

IOR

sot-hrp2-hrpsys

sot-hrprtc-hrp2

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 44/47 Robotics Principia

(60)
(61)

Solvers

Inverse Dynamics

Weighted Pseudo Inverse

 Faster (!?) computation

 Easier to formulate

 Do not guarantee convergence

 Difficulty to tune the weights

 Do not handle properly inequalities

Hierarchical Quadratic Program

 Slower (!?) computation time

 Warranty on priority

 Handle easily inequalities

 Difficult to formulate (here

hidden in the solver)

 Known problems with cycles

and singularities management

LAAS-CNRS

/Laboratoire d’Analyse et d’Architecture des Systèmes Sophia-Antipolis - Jan, 24th - O. Stasse 46/47 Robotics Principia

(62)

Conclusions

Pros

 Generic to put instantaneous controller together

 Allow code reusability

 Real-time performance

 Adapted to complex applications

 Binary packages support

 Eigen support

Cons

 Research code

Références

Documents relatifs

FeatureGluonJ pro- vides a generic feature module, which is a reusable feature module to implement derivatives among features extending common feature modules.. The Copy fea- ture

Currently there is no process for architectural design and implementation that: (1) uses advanced techniques for separating variable features at the ar- chitectural design

A simple variational data assimilation problem was used as a case-study to assess the impact of various strategies for scaling and updating the L-BFGS diagonal preconditioner, both

Maintient de l'imperméabilité aux ions. 10h : augmentation du TEET avec HC, diminution avec TNF et IL-1, pas d'effet de ET-1. 40h : augmentation avec HC, diminution avec TNF,

Choisir le menu Sélection puis Cellule et cocher le critère désiré (constante, formule, blancs,...) Utile pour sélectionner les cellules contenant une base de données ou une

Il est possible de déposer des données de recherche sur HAL (images, vidéos, sons, cartes) soit comme données supplémentaires qui apparaissent en annexe de vos dépôts d’articles

In the simulation litterature, a discrete event simulation is based on a model which changes its state at discrete points in simulated time.. In turn, Parallel Discrete Event

A partir de la partie Réelle (qui est la plus simple) du déterminant donner l’expression de la fréquence d’oscillation, F 0. Déterminer la valeur de  et dire si