Classes | Functions
test_calibration.cpp File Reference

This is a set of unit tests testing the calibration process. More...

#include "sr_utilities/calibration.hpp"
#include <gtest/gtest.h>
#include <ros/ros.h>
Include dependency graph for test_calibration.cpp:

Go to the source code of this file.

Classes

class  CalibrationTest

Functions

int main (int argc, char **argv)
 TEST (Calibration2Points, before)
 TEST (Calibration2Points, in)
 TEST (Calibration2Points, after)
 TEST (Calibration2Points, on)
 TEST (Calibration3Points, before)
 TEST (Calibration3Points, first_interval)
 TEST (Calibration3Points, second_interval)
 TEST (Calibration3Points, after)
 TEST (Calibration3Points, on)
 TEST (Calibration5Points, mixed_and_big_test)

Detailed Description

This is a set of unit tests testing the calibration process.

Author:
Ugo Cupcic <ugo@shadowrobot.com>
Date:
Fri Jun 10 15:52:46 2011

Copyright 2011 Shadow Robot Company Ltd.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Definition in file test_calibration.cpp.


Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 390 of file test_calibration.cpp.

TEST ( Calibration2Points  ,
before   
)

We test that the value generated by a two point table with a value asked before the table is correct: table: | 1.0 | 3.0 | | 2.0 | 5.0 |

calibration(0) = 1.0

Definition at line 55 of file test_calibration.cpp.

TEST ( Calibration2Points  ,
in   
)

We test that the value generated by a two point table with a value asked in the table is correct: table: | 1.0 | 3.0 | | 2.0 | 5.0 |

calibration(1.5) = 4.0

Definition at line 83 of file test_calibration.cpp.

TEST ( Calibration2Points  ,
after   
)

We test that the value generated by a two point table with a value asked after the table is correct: table: | 1.0 | 3.0 | | 2.0 | 5.0 |

calibration(3) = 7.0

Definition at line 110 of file test_calibration.cpp.

TEST ( Calibration2Points  ,
on   
)

We test that the value generated by a two point table with a value asked on a point of the table is correct: table: | 1.0 | 3.0 | | 2.0 | 5.0 |

calibration(3) = 7.0

Definition at line 137 of file test_calibration.cpp.

TEST ( Calibration3Points  ,
before   
)

We test that the value generated by a three point table with a value asked before the table is correct: table: | 1.0 | 3.0 | | 2.0 | 5.0 | | 3.0 | 4.0 |

calibration(0) = 1.0

Definition at line 172 of file test_calibration.cpp.

TEST ( Calibration3Points  ,
first_interval   
)

We test that the value generated by a three point table with a value asked in the first interval is correct. table: | 1.0 | 3.0 | | 2.0 | 5.0 | | 3.0 | 4.0 |

calibration(1.5) = 4.0

Definition at line 203 of file test_calibration.cpp.

TEST ( Calibration3Points  ,
second_interval   
)

We test that the value generated by a three point table with a value asked in the second interval is correct. table: | 1.0 | 3.0 | | 2.0 | 5.0 | | 3.0 | 4.0 |

calibration(2.5) = 4.5

Definition at line 234 of file test_calibration.cpp.

TEST ( Calibration3Points  ,
after   
)

We test that the value generated by a three point table with a value asked after the table is correct. table: | 1.0 | 3.0 | | 2.0 | 5.0 | | 3.0 | 4.0 |

calibration(4.0) = 3.0

Definition at line 265 of file test_calibration.cpp.

TEST ( Calibration3Points  ,
on   
)

We test that the value generated by a three point table with a value asked on a point of the table is correct. table: | 1.0 | 3.0 | | 2.0 | 5.0 | | 3.0 | 4.0 |

calibration(2.0) = 5.0

Definition at line 296 of file test_calibration.cpp.

TEST ( Calibration5Points  ,
mixed_and_big_test   
)

We test that the values generated by a five points table with the table being initialised in the wrong order. table: | 1.0 | -2.0 | | 2.0 | 0.0 | | 3.0 | -4.0 | | 5.0 | 6.0 | | 10. | 0.0 |

calibration(0.0) = -4.0 calibration(1.0) = -2.0 calibration(1.5) = -1.0 calibration(2.0) = 0.0 calibration(2.5) = -2.0 calibration(3.0) = -4.0 calibration(4.0) = 1.0 calibration(5.0) = 6.0 calibration(7.5) = 3.0 calibration(10.) = 0.0 calibration(15.) = -6.0

Definition at line 342 of file test_calibration.cpp.



sr_utilities
Author(s): Ugo Cupcic
autogenerated on Fri Jan 3 2014 12:02:44