towards live programming in ros with pharos and lrp

22
Towards Live Programming in ROS with PhaROS and LRP Pablo Estefó 1 , Miguel Campusano 2 , Luc Fabresse 1 , Johan Fabry 2 , Jannik Laval 1 , and Noury Bouraqadi 1 hJp://pleiad.cl hJp://car.minesdouai.fr France 1 2

Upload: nourybouraqadi

Post on 14-Jun-2015

1.210 views

Category:

Technology


6 download

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, Italy

TRANSCRIPT

Page 1: Towards Live Programming in ROS with PhaROS and LRP

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

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

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

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

Live  Programming  5  

Edit  program  at  Run-­‐Ome  

Immediate  Feedback  

Page 6: Towards Live Programming in ROS with PhaROS and LRP

Programming  with  ROS  6  

Parameters  

Code  

Node  1   Topic   Node  2  

Page 7: Towards Live Programming in ROS with PhaROS and LRP

ROS  Example  7  

square_length  

Code  

draw_  square  

velocity   turtle  

Page 8: Towards Live Programming in ROS with PhaROS and LRP

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

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

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

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

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

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

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

Proposal  •  Highly  reflecOve  and  Dynamic  – “Everything  happens  at  run-­‐Ome”  

15  

Page 16: Towards Live Programming in ROS with PhaROS and LRP

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

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

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

Example  1:  Stop  on  Obstacle  

���� ������

���������

����

���� ����������

19  

On  User  Command  

On  Obstacle  

Page 20: Towards Live Programming in ROS with PhaROS and LRP

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

Example  Video  21  

Page 22: Towards Live Programming in ROS with PhaROS and LRP

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