Commit Graph

157 Commits

Author SHA1 Message Date
Robert Haschke
070c6e9ab6 Disable failing test FallbacksFixtureConnect.connectStageInsideFallbacks
... as we are now missing the implementation for CONNECT interfaces
2021-11-25 07:35:28 +01:00
Robert Haschke
e67b3252fc static TaskPrivate::swap() -> ContainerBasePrivate::operator=()
- Enable moving/swapping of other container impls (e.g. Fallbacks)
- Clarify (via move semantics) that content of source impl will be lost
- Get rid of friend declarations
2021-11-24 21:17:49 +01:00
Robert Haschke
c822fd3822 Remove logger configuration
Logger config can be more easily handled via ROSCONSOLE_CONFIG_FILE.
2021-11-24 15:08:20 +01:00
Robert Haschke
a0bc0602e8 Enable tests
Adapt test results FallbacksFixturePropagate.computeFirstSuccessfulStagePerSolutionOnly
due to 2e63c154aa:

The order of computations has changed, because we lock the processed state
as soon as it is forwarded to the first fallback child.

In this case, after processing GEN1 und FWD1 once, we have the two states with costs 2, 4 in the queue.
The first one, i.e. with cost 2 is forwarded to the child FWD2, which fails.
In the next cycle, although we have new states in the queue (1, 2, 3, 4), we stick with state "2"
and forward it two FWD3, which adds costs 210, resulting in 212.

With previous code, the Fallback container switched to state "1", forwarded to FWD2.
2021-11-24 15:07:21 +01:00
v4hn
8719b1c3d6 Implement state-wise Fallbacks
Keep the previous logic around for Generator stages.
Note that this only makes sense for *pure* Generators and not for MonitoringGenerator,
because for the latter we would expect monitored solutions to be passed individually
(similar to pruning).
2021-11-15 09:29:09 +01:00
v4hn
0f53db5f12 simplify parameter-free lambdas
I just didn't know the syntax was allowed
2021-11-10 13:33:26 +01:00
Robert Haschke
01d0cf9a13 Extend mtc_add_test() macro to handle rostest as well 2021-11-10 13:14:04 +01:00
v4hn
e1216aa8ab MoveTo supports attached objects&subframes for ik frame 2021-11-10 13:14:04 +01:00
v4hn
aee76fee5e add move MoveTo tests
(partially disabled because broken)
2021-11-10 13:12:21 +01:00
v4hn
86fe752d43 InterpolationPlanner: implement simple IK-based solver for pose targets 2021-11-10 13:12:21 +01:00
v4hn
ef86799f27 add some tests for MoveTo 2021-11-10 13:12:21 +01:00
v4hn
e60a9793f1 fix test helper
never unload the plugin loader before the plugins (IK plugins here).
We don't have unrelated loaders in gtest executables, so the static should be fine.
2021-11-10 13:12:21 +01:00
v4hn
55e30e26ce split off pruning tests
yes, most pruning happen along children of a serial container,
but children for many tests comprise a lot of other containers as well.

- migrated pruning tests from Connect to ConnectMockup (as the concrete implementation
is not relevant for them)

- added missing header to stage_mockups.h
2021-10-04 23:06:13 +02:00
v4hn
9428c83ba5 consolidate test base 2021-10-04 23:06:13 +02:00
Michael Görner
8b2ac94609
define core tests through macros (#299)
Maybe it makes sense to define this in an exported config,
but then why bother until someone needs it.
2021-10-04 22:27:34 +02:00
Michael Görner
e89c68ced0
Merge pull request #294 from v4hn/pr-fallbacks-split-tests
new set of fallback tests
2021-09-20 23:13:10 +02:00
v4hn
40b00c61d2 DISABLED_FAILED -> FAILED
Failed states are *not* disabled, they just failed connecting (for now).
2021-09-20 23:07:00 +02:00
v4hn
dbfa7e2b8a disable currently failing tests
They will be enabled when the corresponding functionality is merged.
2021-09-20 15:11:13 +02:00
Robert Haschke
35dc037365 Add more fallback tests 2021-09-20 14:52:15 +02:00
Robert Haschke
4e0f295d1e Replace std::list<double>() with PredefinedCosts() 2021-09-20 14:50:13 +02:00
Robert Haschke
61496fecd3 Simplify tests by introducing EXPECT_COSTS() 2021-09-20 14:50:03 +02:00
v4hn
61399d6d23 fixup & extend fallback tests 2021-09-20 14:49:01 +02:00
v4hn
a582fe8297 add another non-trivial test for a reliable fallbacks container 2021-09-20 14:42:55 +02:00
v4hn
b61e045f2c add a test for generator-fallbacks 2021-09-20 14:42:48 +02:00
v4hn
f75a498f55 fallbacks: add a test to use fallbacks *per state*
The current implementation will not fall back for each state
independently, but is meant to stay with the first child producing
a solution. For propagators, this is problematic though
as the picked child depends on the (arbitrary) first received state.

Instead, fallbacks should pass each state to each child separately
until one produces a solution for it (or all are exhausted).
2021-09-20 14:42:42 +02:00
v4hn
2bee9d5f66 rearrange fallback test fixtures 2021-09-20 14:42:35 +02:00
v4hn
5d9efc3b2b fallback tests: use fixture 2021-09-20 14:42:26 +02:00
v4hn
001eadaf3d move fallback to separate test 2021-09-20 14:42:20 +02:00
v4hn
14380c5552 add another test to cover both cases for failing children 2021-09-20 14:42:14 +02:00
v4hn
3244ac92b1 disable ConnectStageInsideFallbacks
This should work, but will require more changes.
2021-09-20 14:42:08 +02:00
Robert Haschke
c6cdd1a970 Fix test Fallback.ActiveChildReset 2021-09-20 14:41:51 +02:00
j-kuehn
f6eadb3fc4 add unit tests for Fallbacks container 2021-09-20 14:41:42 +02:00
v4hn
74d33c4ec0 Merge different mockup implementations
Co-authored-by: Jascha Kühn <57101356+j-kuehn@users.noreply.github.com>
2021-07-07 14:25:42 +02:00
v4hn
4b1f240c21 test_container: correctly initialize robot_model
The local mocks do not care, but leaving a dangling nullptr
leads to segfaults with refactoring/new tests. :-)
2021-07-07 14:25:42 +02:00
v4hn
0e40b464ec support TYPED_TEST_SUITE
Get rid of deprecation warning if new variant exists.
2021-06-04 14:19:52 +02:00
v4hn
9d53987e53 satisfy clang-tidy & -Werror -Wall -Wextra 2021-06-04 14:19:52 +02:00
Robert Haschke
437cc550f2 Add missing semicolons after cleanup of MoveIt 2021-05-29 00:38:43 +02:00
v4hn
059a939203 Fix test: correctly reset Interface 2021-05-28 00:20:07 +02:00
v4hn
58b1a020b5 Fix memory leak in unit test 2021-05-28 00:19:45 +02:00
v4hn
7eb8fad57e remove unused helper method 2021-05-12 19:21:19 +02:00
v4hn
f7015ee021 fix pick_ur5 test
TAMS' models changed and often produces less solutions.
2021-05-12 19:21:19 +02:00
Robert Haschke
cfcb1f274e Fix more clang-tidy issues 2021-04-24 02:12:24 +02:00
Robert Haschke
4fa8c10f44 clang-tidy auto-fixes 2021-04-24 02:03:24 +02:00
Robert Haschke
889b61529b Fix trailing white space 2021-04-23 23:49:50 +02:00
Robert Haschke
dc8cd34b86 Simplify tests 2021-04-01 00:21:07 +02:00
v4hn
4e09d78239 Implement pruning inside-to-outside of a container
- Remove public onNewFailure() interface
  Moved to ContainerBasePrivate to reuse logic for serial and parallel containers.
- Add tests
2021-04-01 00:19:15 +02:00
v4hn
106c138ef5 Implement pruning inside serial container
By inefficient inverse lookup.

Also add disabled test for the inverted inference (failure inside should prune outside)
2021-03-30 15:19:49 +02:00
v4hn
3e5e1da429 add (failing) simple pruning test
to validate propagators do not compute disabled solutions.
It's also good to have a simpler test around than 2 connects.
2021-03-22 14:42:23 +01:00
v4hn
9cf3c01b9a pruning tests: restructure tests 2021-03-22 14:42:23 +01:00
v4hn
f8f885966e add failing pruning test for branching propagator 2021-03-22 14:42:23 +01:00