towards test-driven development for mobile robots
DESCRIPTION
Slides of the presentation given at the ICRA 2013 workshop on Software Development and Integration in Robotics (SDIRIII) http://robotics.unibg.it/tcsoft/sdir2013/index.htmlTRANSCRIPT
Towards Test-Driven Development for Mobile Robots
Luc Fabresse, Jannik Laval and Noury Bouraqadi!
http://car.mines-douai.fr!
@SDIR - ICRA - May 2013!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
2!
Outline!
1. Test-driven Development (TDD)!
2. TDD for Mobile Software Robotics!
3. BoTest!
4. Report on an Experiment!
5. Summary & Future Work!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
3!
CAIRE Project!
• Coodinator: Luc Fabresse!
• Partners: INRIA Lille RMoD, IEMN Telice!
• 2012-2014!
• Nord-Pas de Calais Council funding (France)!
• Indoor Exploration and Mapping!
• Agile methodology for Robotic Software !
http://car.mines-douai.fr May 2013, @SDIR - ICRA
4!
Software Development!
Specifications /!Requirements!
Software!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
5!
Software Development!
Specifications /!Requirements!
Software!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
6!
Software Development!
Specifications /!Requirements!
Software!
complies with?!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
7!
Test-driven Development!
Specifications /!Requirements!
Software!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
8!
Test-driven Development!
Specifications /!Requirements!
Software!
Tests!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
9!
Test-driven Development!
Specifications /!Requirements!
Software!
Tests!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
10!
Test-driven Development!
Specifications /!Requirements!
Software!
Tests!
complies !with?!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
11!
Benefits of TDD!
• Requirements as executable units: Tests!
• Ensure Software compliance with Tests !
• Short development cycles!
• Detecting regressions!
• ...!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
12!
TDD for Mobile Robotics "Software Development !
Control!Software!Specifications /!
Requirements!
Tests!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
13!
Why TDD for "Mobile Robotics Software!
Control!Software!Specifications /!
Requirements!
Tests!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
14!
Why TDD for "Mobile Robotics Software!
Control!Software!Specifications /!
Requirements!
Tests!
for one product line !
http://car.mines-douai.fr May 2013, @SDIR - ICRA
15!
Why TDD for "Mobile Robotics Software!
Specifications /!Requirements!
Tests!
for one product line !
written once! • Quality Assurance!• Maintenance !
Control!Software!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
16!
Challenges of TDD "for Mobile Software Robotics!
• Hardware in the loop!
• ``identical’’ hardware in production lines!
• Physical constraints!
• ...!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
17!
Requirements "for Robot Test!
• Repeatability!
• Reuse!
• Safety!
• Automation!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
18!
A Tool for Robotics TDD!
• BoTest (http://car.mines-douai.fr/software/)!
• Implemented in as an extension of SUnit"(http://www.pharo-project.org)!
• Helps to write tests for robots!
• Support expressing dependencies between tests!
• Run tests in a specific order!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
19!
Example!
the robot should move straight 4m with 3% of
error !at most!Specifications /!
Requirements!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
20!
A Motion Test!
Test!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
21!
Test!
A Motion Test!
Test name!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
22!
Test!
A Motion Test!
Tester action requested !to setup the robot name!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
23!
Test!
A Motion Test!
Tested code!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
24!
Test!
A Motion Test!
Assertion verified! by the tester!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
25!
A Motion Test!
But the robot !should not hit walls !!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
26!
A Motion Test!
Add collision detection using Laser!
But the robot !should not hit walls !!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
27!
A Motion Test!
Collision detection using Laser!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
28!
A Motion Test!
Add required Tests !
http://car.mines-douai.fr May 2013, @SDIR - ICRA
29!
A Motion Test!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
30!
Laser Tests!
PBLaserTest!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
31!
Laser Tests!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
32!
Laser Tests!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
33!
Laser Tests!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
34!
Laser Tests!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
35!
Running a Test!the robot "
should move straight 4m with
3% of error !at most!
Specifications /!Requirements!
testStraightLineMotion!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
36!
Running a Test!the robot "
should move straight 4m with
3% of error !at most!
Specifications /!Requirements!
testStraightLineMotion!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
37!
Running a Test!the robot "
should move straight 4m with
3% of error !at most!
Specifications /!Requirements!
testStraightLineMotion!
1 run, 1 passes!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
38!
Running a Test!the robot "
should move straight 4m with
3% of error !at most!
Specifications /!Requirements!
testStraightLineMotion!
1 run, 1 passes! 1 run, 0 passes,!1 requirementFailure!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
39!
Running a Test!the robot "
should move straight 4m with
3% of error !at most!
Specifications /!Requirements!
testStraightLineMotion!
1 run, 1 passes! 1 run, 0 passes,!1 requirementFailure!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
40!
Running a Test!
Requirements !are executed!
first!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
41!
Running a Test!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
42!
Running a Test!
1 run, 0 passes,!1 requirementFailure!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
43!
Summary!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
44!
Summary!
http://car.mines-douai.fr May 2013, @SDIR - ICRA
45!
Future Work!
• Automatic test dependencies extraction!
• Improve tests automation !
• Continuous integration for non-interactive tests!
• Specialized development tools!
Towards Test-Driven Development for Mobile Robots
Luc Fabresse, Jannik Laval and Noury Bouraqadi!
@SDIR - ICRA - May 2013!
Looking for a 18 months PostDoc!
http://car.mines-douai.fr/2013/03/postdoc-position/!More infos:!
Keywords: Robotics Software, Agile development, Dynamic Languages, ... !
Starting: ~Sept 2013!