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
![Page 1: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/1.jpg)
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
![Page 2: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/2.jpg)
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
![Page 3: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/3.jpg)
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
![Page 4: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/4.jpg)
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
![Page 5: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/5.jpg)
Live Programming 5
Edit program at Run-‐Ome
Immediate Feedback
![Page 6: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/6.jpg)
Programming with ROS 6
Parameters
Code
Node 1 Topic Node 2
![Page 7: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/7.jpg)
ROS Example 7
square_length
Code
draw_ square
velocity turtle
![Page 8: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/8.jpg)
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
![Page 9: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/9.jpg)
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
![Page 10: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/10.jpg)
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
![Page 11: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/11.jpg)
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
![Page 12: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/12.jpg)
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
![Page 13: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/13.jpg)
Requirement 3 • Change node code at run-‐Ome • Problem in ROS : – Use of C/C++ mainly – No Hot Code Swapping
13
Code
![Page 14: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/14.jpg)
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
![Page 15: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/15.jpg)
Proposal • Highly reflecOve and Dynamic – “Everything happens at run-‐Ome”
15
![Page 16: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/16.jpg)
Proposal • Highly reflecOve and Dynamic – “Everything happens at run-‐Ome”
• DSL for hierarchical state machines – Integrated with Pharo
16
![Page 17: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/17.jpg)
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
![Page 18: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/18.jpg)
LRP + PhaROS in AcOon 18
DifferenOal Drive
Odometery
Laser Range
/pose
PhaROS node
LRP Automata
ROS Graph
![Page 19: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/19.jpg)
Example 1: Stop on Obstacle
���� ������
���������
����
���� ����������
19
On User Command
On Obstacle
![Page 20: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/20.jpg)
Example 2: Obstacle Avoider
���� ������
���������
����
������
���� ��
��������
������
������
������
20
Obstacle Right Obstacle
NO Obstacle NO Le2 Obstacle
NO Right Obstacle
Le2 Obstacle
![Page 21: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/21.jpg)
Example Video 21
![Page 22: Towards Live Programming in ROS with PhaROS and LRP](https://reader033.vdocuments.net/reader033/viewer/2022052904/557d60a6d8b42aba3d8b5014/html5/thumbnails/22.jpg)
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