GCC Code Coverage Report | |||||||||||||||||||||
|
|||||||||||||||||||||
Line | Branch | Exec | Source |
1 |
|||
2 |
/* Copyright 2019, LAAS-CNRS |
||
3 |
* |
||
4 |
* Olivier Stasse |
||
5 |
* |
||
6 |
*/ |
||
7 |
#include <dynamic-graph/factory.h> |
||
8 |
|||
9 |
#include <example-robot-data/path.hpp> |
||
10 |
#include <iostream> |
||
11 |
#include <sstream> |
||
12 |
|||
13 |
// Needed for sendMsg. |
||
14 |
#define ENABLE_RT_LOG |
||
15 |
#include <dynamic-graph/real-time-logger.h> |
||
16 |
|||
17 |
#include <sot/core/debug.hh> |
||
18 |
#include <sot/core/robot-utils.hh> |
||
19 |
#include <sot/torque_control/control-manager.hh> |
||
20 |
|||
21 |
#define BOOST_TEST_MODULE test - control - manager |
||
22 |
|||
23 |
#include <boost/test/output_test_stream.hpp> |
||
24 |
#include <boost/test/unit_test.hpp> |
||
25 |
|||
26 |
using boost::test_tools::output_test_stream; |
||
27 |
namespace dyn_sot_tc = dynamicgraph::sot::torque_control; |
||
28 |
|||
29 |
✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗✓✗ ✓✗ |
4 |
BOOST_AUTO_TEST_CASE(testControlManager) { |
30 |
✓✗✓✗ ✓✗✓✗ |
2 |
dgADD_OSTREAM_TO_RTLOG(std::cout); |
31 |
|||
32 |
dyn_sot_tc::ControlManager &a_control_manager = |
||
33 |
*(dynamic_cast<dyn_sot_tc::ControlManager *>( |
||
34 |
✓✗✓✗ ✓✗✓✗ ✓✗ |
4 |
dynamicgraph::FactoryStorage::getInstance()->newEntity( |
35 |
2 |
"ControlManager", "a_control_manager"))); |
|
36 |
|||
37 |
✓✗ | 2 |
a_control_manager.setLoggerVerbosityLevel(dynamicgraph::VERBOSITY_ALL); |
38 |
|||
39 |
✓✗ | 4 |
std::string robotRef("simple_humanoid_description"); |
40 |
✓✗ | 4 |
a_control_manager.init( |
41 |
✓✗ | 2 |
0.001, |
42 |
EXAMPLE_ROBOT_DATA_MODEL_DIR |
||
43 |
"/simple_humanoid_description/urdf/simple_humanoid.urdf", |
||
44 |
robotRef); |
||
45 |
|||
46 |
✓✗ | 4 |
dynamicgraph::Vector av; |
47 |
✓✗ | 2 |
a_control_manager.m_uSOUT.needUpdate(6); |
48 |
|||
49 |
✓✗ | 2 |
dynamicgraph::RealTimeLogger::destroy(); |
50 |
2 |
} |
Generated by: GCOVR (Version 4.2) |