31
Introduction to Localization and Mapping ROS & PhaROS Developing in Pharo Conclusion Robotic Exploration and Mapping with Pharo Johann Dichtl, Luc Fabresse, and Noury Bouraqadi IMT Lille – Douai, France Mai 18, 2017

Robotic Exploration and Mapping with Pharo

  • Upload
    pharo

  • View
    151

  • Download
    1

Embed Size (px)

Citation preview

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Robotic Exploration and Mapping with Pharo

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi

IMT Lille – Douai, France

Mai 18, 2017

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Table of Contents

1 Introduction to Localization and Mapping

2 ROS & PhaROS

3 Developing in Pharo

4 Conclusion

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 2/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

What is SLAM?Our robots

Introduction to Localization and Mapping

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 3/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

What is SLAM?Our robots

What is SLAM?

Simultaneous Localization And Mapping (SLAM)

A chicken–and–egg problem:

to locate ourself, we need a mapto create/update a map, we need to know our location

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 4/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

What is SLAM?Our robots

Robots in our lab:

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 5/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

What is SLAM?Our robots

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 6/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

ROSPhaROS

ROS & PhaROS

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 7/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

ROSPhaROS

ROS & PhaROS

What is the Robot Operation System (ROS)?

ROS is:the de-facto standard middleware used in roboticswritten in C++ and Pythonprovides an architecture with a central control structurehas a modular design, build on nodesorganizes data flow via topicssupports distribute systems

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 8/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

ROSPhaROS

ROS & PhaROS

Example architecture of a ROS system

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 9/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

ROSPhaROS

ROS & PhaROS

Inter–node communication

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 10/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

ROSPhaROS

ROS & PhaROS

Two systems with one common master

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 11/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

ROSPhaROS

ROS & PhaROS

PhaROS allows us to use Pharo withinthe ROS framework to:

create nodes (written in Pharo)use topicsto transmit and receive data

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 12/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Working in roboticsLimitationsTestingBugs

Developing in Pharo

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 13/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Working in roboticsLimitationsTestingBugs

Developing in Pharo

Our setup:Pharo 5 (+latest PhaROS)Linux (Ubuntu 16.04 LTS)ROS kinetic

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 14/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Working in roboticsLimitationsTestingBugs

Developing in Pharo

What is different when working in robotics?

working with hardware (robots) and simulationsheterogenous systemsdistributed systems

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 15/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Working in roboticsLimitationsTestingBugs

Developing in Pharo

Limitations in Pharo and how to deal with them

multithreading supportlinear algebra / matricesno 32bit floats

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 16/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Working in roboticsLimitationsTestingBugs

Developing in Pharo

Multithreading support

Pharo supports multiple threads, but only uses a single CPUcore.

split the node into multiple smaller nodes, running eachnode in its own imagecommunication between nodes requires (de-)serializationof objects

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 17/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Working in roboticsLimitationsTestingBugs

Developing in Pharo

Linear algebra & matrices

Only basic support for linear algebra.

DhbMatrix as basisextensions by us, for example to compute eigen vectors &valuesGeometry utility classes in PhaROS

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 18/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Working in roboticsLimitationsTestingBugs

Developing in Pharo

Testing

visual debuggingalso test on real robots

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 19/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Working in roboticsLimitationsTestingBugs

Developing in Pharo

Visual debugging

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 20/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Working in roboticsLimitationsTestingBugs

Developing in Pharo

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 21/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Working in roboticsLimitationsTestingBugs

Bugs

Bugs in Pharo

Athens: random freezesRectangle #center message

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 22/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Working in roboticsLimitationsTestingBugs

Rectangle bug

Rectangle #center message

Code example:

r e c t := Rectangle o r i g i n : [email protected] corner : 0.8@0. 8 .center := r e c t center .r e c t con ta insPo in t : center . ” f a l s e ”

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 23/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Working in roboticsLimitationsTestingBugs

Rectangle bug

What happened?

#center answers with the coordinates floored to the nextinteger. In our example the result is 0@0, which is indeedoutside of the rectangle.

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 24/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Working in roboticsLimitationsTestingBugs

Rectangle bug

How to fix it?

First try: fix the #center message.

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 25/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Working in roboticsLimitationsTestingBugs

Rectangle bug

Result: broke some GUI code with the bugfix

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 26/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

Working in roboticsLimitationsTestingBugs

Rectangle bug

Second try: derive new class from Rectangle and fix there

Result: works, but requires some refactoring in our code

Tracker link:https://pharo.fogbugz.com/f/cases/20015

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 27/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

ConclusionFuture work

Conclusion

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 28/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

ConclusionFuture work

Conclusion

robotics with Pharo is quite doableperformance can be limiting in pharo

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 29/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

ConclusionFuture work

Future work

automated tests with the full setupworking with multiple robots at once

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 30/31

Introduction to Localization and MappingROS & PhaROS

Developing in PharoConclusion

ConclusionFuture work

Thanks for listening!

Any questions?

Johann Dichtl, Luc Fabresse, and Noury Bouraqadi Robotic Exploration and Mapping with Pharo 31/31