Commit Graph

1259 Commits

Author SHA1 Message Date
Robert Haschke
ab9af6a0fa Recursively re-enable states when matching an ARMED state 2021-11-21 14:00:50 +01:00
Robert Haschke
3c4ef68dbe Rename Interface::Status FAILED -> ARMED
... to better indicate that such a state can be immediately re-enabled.
2021-11-21 14:00:50 +01:00
Robert Haschke
1dda3d14d8 Switch order of function declarations
... to avoid explicit template initialization
2021-11-20 06:24:19 +01:00
Robert Haschke
52dc494525 Fix test Pruning.NoPruningIfAlternativesExist 2021-11-20 06:24:19 +01:00
Robert Haschke
06ae5ddf9c Fix hasPendingOpposites()
- Switch directions: FORWARD <-> BACKWARD to make the function reusable for status propagation.
- We need to ignore the source state when looking for opposite states of the target state.
  Thus add both, source and target state arguments.
2021-11-20 01:24:29 +01:00
Robert Haschke
29d1e44c5d Rework updatePriority() functions
- Centrally distinguish between have owner() or not in InterfaceState::updatePriority()
- Have a separate updateStatus() method to just update the pruning status
- Split Interface::updatePriority() into a method taking the InterfaceState*
  and one taking an Interface::iterator (for efficiency)
- Early return in container.cpp's updateStatePrios()
2021-11-19 23:03:15 +01:00
Robert Haschke
4170a1c93a Drop unused and misleading Direction enums 2021-11-19 23:03:15 +01:00
Robert Haschke
1ddf7dd3f0 Never remove pending CONNECT pairs
Both, failed and pruned states might get re-enabled later!
This also required rework (simplification) of the sorting function for pending pairs.
2021-11-19 23:03:15 +01:00
Robert Haschke
97c2130404 Improve readability 2021-11-19 21:49:44 +01:00
Robert Haschke
718170ab1e Always skip pruning if there exist alternative enabled solutions 2021-11-19 21:49:44 +01:00
Robert Haschke
c617e3353d Disable failing tests 2021-11-19 21:46:09 +01:00
Robert Haschke
011e4be059 Add more pruning tests 2021-11-19 09:42:30 +01:00
Robert Haschke
66e141db7b Fix printChildrenInterfaces() 2021-11-19 09:42:30 +01:00
Robert Haschke
ed459702bd Fix -Wsign-compare 2021-11-19 02:05:46 +01:00
v4hn
b675876d3b add debug logs to pruning code 2021-11-16 22:52:06 +01:00
JafarAbdi
2d775ffe28 GeneratorMockup: Add solutions_per_compute argument 2021-11-16 22:51:29 +01:00
v4hn
b6ac5b09ba add demo illustrating useful fallbacks behavior 2021-11-15 09:29:09 +01:00
v4hn
887da5b094 fix fallbacks logic
Setting up a demo for
Fallbacks({CartesianPath,PTP,RRTConnect})
I found the logic did not work as expected yet.

- process last job spec as well
- ignore failures when looking for a solution
- add more debug output
2021-11-15 09:29:09 +01:00
v4hn
22809c04a5 order external states 2021-11-15 09:29:09 +01:00
v4hn
9a583ab006 run only one compute step per call
Note that while this ensures other stages outside the Fallbacks container
can compute as well, it does not solve the problem internally.
A new incoming state will only ever be considered once
the current stage cannot compute any more.

We have no way of telling a child to compute for *a specific state* for now.
So once we copied a state to its interface we have to let it compute until
all possibilities are exhausted to detect whether or not it could generate a solution for it.
If we wouldn't do so, there were no way of knowing when to fall back
to the next child as long as the stage can still compute on *any* copied solution.
2021-11-15 09:29:09 +01:00
v4hn
5a9cfc50ea cleanup: get rid of superfluous parameter 2021-11-15 09:29:09 +01:00
v4hn
aa733fcf5f simplify onNewFailure
give an elaborate reason for an empty overload that doesn't call the parent.
2021-11-15 09:29:09 +01:00
v4hn
3d5cecd753 fallback generator can run a single job per compute call 2021-11-15 09:29:09 +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
f32e747645 add hook to ParallelContainerBase to customize state propagation 2021-11-15 09:29:09 +01:00
Michael Görner
79869b856c
Merge pull request #304 from v4hn/pr-move-to-tests
Add MoveTo tests & make them pass
2021-11-12 23:14:57 +01:00
v4hn
3b835986e3 refactor logic to handle ik_frame
fallbacks and verification.
2021-11-12 14:02:46 +01:00
v4hn
f1fc447e3b establish utils namespace
leaves us a place to put free helper functions
2021-11-10 14:36:58 +01:00
v4hn
48959c6806 add compat header to cmake
previous oversight
2021-11-10 14:35:25 +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
ef27a6eb22 ComputeIK supports attached-object ik frame 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
dfe746b9bb FixedState: add optional scene in constructor 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
Robert Haschke
d6f68f9254 Simplify code
We know that trajectory at least comprises the start state.
Thus, we don't need the sanity checks.
2021-11-10 12:11:39 +01:00
Robert Haschke
71fab0fbce Simplify allowCollisions(object, JMG) 2021-11-10 12:11:39 +01:00
Robert Haschke
aa54de0447
Gracefully handle execution_type (#307)
In moveit_resources 0.8.1 the arg execution_type was renamed to fake_execution_type.
To support both, Melodic and Noetic versions of moveit_resources, provide both name variants.
Additionally, disable  roslaunch's checking via pass_all_args="true".
2021-11-10 10:00:13 +01:00
Robert Haschke
9ca8f5a1e3 Improve CI
- Allow downloading of pre-commit + clang-tidy fixes
- Use clang compiler for clang-tidy job
- Adapt to improved lcov-action
2021-10-22 23:28:43 +02:00
Michael Görner
7ec874572c move to tf2_eigen everywhere (#301) 2021-10-18 23:34:29 +02: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
Robert Haschke
9da3a8055e Optimize setStatus(): only escalate to parent interface at boundaries of a partial solution
In all other cases internalToExternalMap().find(s) will fail anyway.
2021-09-20 23:07:00 +02:00
v4hn
47d20984ae simplify test specification
before anyone starts copying from here...
2021-09-20 23:07:00 +02:00
v4hn
81ec8bb3aa demos: improve CMakeLists
- build pick_place_task as proper library as people (e.g. moveit_benchmark_suite) reuse it
2021-09-20 23:07:00 +02:00