towards live programming in ros with pharos and lrp
DESCRIPTION
In traditional robot behavior programming, the edit-compile-simulate-deploy-run cycle creates a large mental disconnect between program creation and eventual robot behavior. This significantly slows down behavior development because there is no immediate mental connection between the program and the resulting behavior. With live programming the development cycle is made extremely tight, realizing such an immediate connection. In our work on programming of ROS robots in a more dynamic fashion through PhaROS, we have experimented with the use of the Live Robot Programming language. This has given rise to a number of requirements for such live programming of robots. In this text we introduce these requirements and illustrate them using an example robot behavior. More on PhaROS at http://car.mines-douai.fr/ This presentation has been given at DSL Rob Workshop as part of the SIMPAR 2014 Conference in Bergamo, ItalyTRANSCRIPT
Towards Live Programming in ROS with PhaROS and LRP
Pablo Estefó1, Miguel Campusano2, Luc Fabresse1, Johan Fabry2, Jannik Laval1,
and Noury Bouraqadi1
hJp://pleiad.cl hJp://car.mines-‐douai.fr France
1 2
RoboOc ApplicaOon Lifecycle
1. Develop / Borrow Parts 2. Assemble Parts
3. Run + Analyze Behavior 4. Stop 5. Fix bugs / Improve
6. Goto step 2
2
ROS RoboOc ApplicaOon Lifecycle
1. Develop / Borrow ROS Packages 2. Assemble = Define Launch file
3. Run + Analyze Behavior 4. Stop 5. Fix bugs / Improve
6. Goto step 2
3
ROS RoboOc ApplicaOon Lifecycle
1. Develop / Borrow ROS Packages 2. Assemble = Define Launch file
3. Run + Analyze Behavior 4. Stop 5. Fix bugs / Improve
6. Goto step 2
4
Context is lost ForgoJen details
Live Programming 5
Edit program at Run-‐Ome
Immediate Feedback
Programming with ROS 6
Parameters
Code
Node 1 Topic Node 2
ROS Example 7
square_length
Code
draw_ square
velocity turtle
Requirements for Live Programming with ROS
1. Stop/Start = Replace individual nodes
2. Change parameters at run-‐Ome
3. Change code at run-‐Ome
4. Change connecOons = topics at run-‐Ome
8
Node
Topic
Code
Parameters
Requirement 1 • Start/Stop Start = Replace individual nodes • Problem in ROS : – ApplicaOon = 1 .launch staOc file
• Command line Changes are lost
– Bug when restarOng individual nodes
9
Node
Requirement 1 • Start/Stop Start = Replace individual nodes – Problem in ROS :
• ApplicaOon = 1 .launch staOc file • Bug when restarOng individual nodes
– Example restarOng a turtle
10
draw_ square
velocity turtle
Requirement 2 • Change node parameters at run-‐Ome • Problem in ROS : – Parameters fixed in launch file/rosrun command line – Changing them à restart the full app
11
Requirement 2 • Change node parameters at run-‐Ome • Problem in ROS : – Parameters fixed in launch file/rosrun command line – Changing them à restart the full app
• Example : Change square_length
12
draw_ square
velocity turtle
square_length
Requirement 3 • Change node code at run-‐Ome • Problem in ROS : – Use of C/C++ mainly – No Hot Code Swapping
13
Code
Requirement 4 • Change node connecOons at run-‐Ome – Change topics names (remape / name space)
• Problem in ROS : – Topic names are fixed at launch Ome
14
Topic
Proposal • Highly reflecOve and Dynamic – “Everything happens at run-‐Ome”
15
Proposal • Highly reflecOve and Dynamic – “Everything happens at run-‐Ome”
• DSL for hierarchical state machines – Integrated with Pharo
16
Proposal • Highly reflecOve and Dynamic – “Everything happens at run-‐Ome”
• DSL for hierarchical state machines – Integrated with Pharo
• PhaROS : ROS Client for Pharo – Nodes developed in Pharo
17
LRP + PhaROS in AcOon 18
DifferenOal Drive
Odometery
Laser Range
/pose
PhaROS node
LRP Automata
ROS Graph
Example 1: Stop on Obstacle
���� ������
���������
����
���� ����������
19
On User Command
On Obstacle
Example 2: Obstacle Avoider
���� ������
���������
����
������
���� ��
��������
������
������
������
20
Obstacle Right Obstacle
NO Obstacle NO Le2 Obstacle
NO Right Obstacle
Le2 Obstacle
Example Video 21
Towards Live Programming in ROS with PhaROS and LRP
Pablo Estefó1, Miguel Campusano2, Luc Fabresse1, Johan Fabry2, Jannik Laval1,
and Noury Bouraqadi1
hJp://pleiad.cl hJp://car.mines-‐douai.fr France
1 2