Commit Graph

203 Commits

Author SHA1 Message Date
Captain Yoshi
1655762a63
Avoid duplicate scenes in Solution.msg from generator stages (#639)
Some checks failed
CI / ${{ matrix.env.IMAGE }}${{ matrix.env.NAME && ' • ' || ''}}${{ matrix.env.NAME }}${{ matrix.env.CATKIN_LINT && ' • catkin_lint' || ''}}${{ matrix.env.CLANG_TIDY && ' • clang-tidy' || '' }} (map[CLANG_TIDY:true IMAGE:noble-ci-testing TARGET_CMAKE_… (push) Has been cancelled
CI / ${{ matrix.env.IMAGE }}${{ matrix.env.NAME && ' • ' || ''}}${{ matrix.env.NAME }}${{ matrix.env.CATKIN_LINT && ' • catkin_lint' || ''}}${{ matrix.env.CLANG_TIDY && ' • clang-tidy' || '' }} (map[DOCKER_RUN_OPTS:-e PRELOAD=libasan.so.8 -e LSAN_OPTI… (push) Has been cancelled
CI / ${{ matrix.env.IMAGE }}${{ matrix.env.NAME && ' • ' || ''}}${{ matrix.env.NAME }}${{ matrix.env.CATKIN_LINT && ' • catkin_lint' || ''}}${{ matrix.env.CLANG_TIDY && ' • clang-tidy' || '' }} (map[IMAGE:jammy-ci]) (push) Has been cancelled
CI / ${{ matrix.env.IMAGE }}${{ matrix.env.NAME && ' • ' || ''}}${{ matrix.env.NAME }}${{ matrix.env.CATKIN_LINT && ' • catkin_lint' || ''}}${{ matrix.env.CLANG_TIDY && ' • clang-tidy' || '' }} (map[IMAGE:noble-ci NAME:ccov TARGET_CMAKE_ARGS:-DCMAKE_B… (push) Has been cancelled
Format / pre-commit (push) Has been cancelled
CI / doc (push) Has been cancelled
CI / deploy (push) Has been cancelled
If start and end scene of a stage are identical (e.g. from a generator), we can use an (empty) scene diff as well.
2025-09-10 17:33:31 +02:00
Robert Haschke
336ad4456c
LimitSolutions wrapper stage (#710)
* Add python bindings for PassThrough
* Add LimitSolutions stage
2025-08-22 08:37:09 +02:00
Captain Yoshi
a0da41a4aa
Fix clamping of joint constraints (#665)
Some checks failed
CI / ${{ matrix.env.IMAGE }}${{ matrix.env.NAME && ' • ' || ''}}${{ matrix.env.NAME }}${{ matrix.env.CATKIN_LINT && ' • catkin_lint' || ''}}${{ matrix.env.CLANG_TIDY && ' • clang-tidy' || '' }} (map[CLANG_TIDY:true IMAGE:noble-ci TARGET_CMAKE_ARGS:-DC… (push) Has been cancelled
CI / ${{ matrix.env.IMAGE }}${{ matrix.env.NAME && ' • ' || ''}}${{ matrix.env.NAME }}${{ matrix.env.CATKIN_LINT && ' • catkin_lint' || ''}}${{ matrix.env.CLANG_TIDY && ' • clang-tidy' || '' }} (map[DOCKER_RUN_OPTS:-e PRELOAD=libasan.so.5 -e LSAN_OPTI… (push) Has been cancelled
CI / ${{ matrix.env.IMAGE }}${{ matrix.env.NAME && ' • ' || ''}}${{ matrix.env.NAME }}${{ matrix.env.CATKIN_LINT && ' • catkin_lint' || ''}}${{ matrix.env.CLANG_TIDY && ' • clang-tidy' || '' }} (map[IMAGE:jammy-ci]) (push) Has been cancelled
CI / ${{ matrix.env.IMAGE }}${{ matrix.env.NAME && ' • ' || ''}}${{ matrix.env.NAME }}${{ matrix.env.CATKIN_LINT && ' • catkin_lint' || ''}}${{ matrix.env.CLANG_TIDY && ' • clang-tidy' || '' }} (map[IMAGE:noble-ci NAME:ccov TARGET_CMAKE_ARGS:-DCMAKE_B… (push) Has been cancelled
Format / pre-commit (push) Has been cancelled
CI / doc (push) Has been cancelled
CI / deploy (push) Has been cancelled
Do not enforce position bounds (by clamping to valid positions), but let the stage fail if joints are outside the limits.
2025-02-25 13:12:53 +01:00
Robert Haschke
4dfcf09516 clang-format-14 2024-12-22 14:09:08 +01:00
Robert Haschke
8c0609a711 clang-tidy fixes: std::endl -> '\n' 2024-12-22 12:29:05 +01:00
Robert Haschke
45ea86c163 clang-tidy fixes: use uint8_t enums 2024-12-22 12:28:58 +01:00
Robert Haschke
5067dbb432 clang-tidy fixes 2024-12-22 12:28:26 +01:00
Captain Yoshi
fdc06c3b91
Reduce stop time due to preempt (#598)
The preempt_request_ flag was only checked at the top-level task container before each compute iteration.
As a single sweep might take a while, we should check the flag before computing each stage.
2024-07-19 15:46:12 +02:00
Robert Haschke
7631486648
Add unittest for #581 2024-07-17 15:10:53 +02:00
Captain Yoshi
cd28bdcd1f
Fix early planning preemption (#597)
Calling preempt() before plan() is able to reset the preempt_requested_ flag causes the preemption request to get lost. To avoid this issue, we allow a) manual resetting of the request and b) reset the request before leaving plan().
2024-07-17 14:56:01 +02:00
Robert Haschke
4debc37904 Silence gcc's overloaded-virtual warnings 2024-07-11 09:50:35 +02:00
Robert Haschke
fbc05e4496
Add property to enable/disable pruning at runtime (#590) 2024-07-06 16:51:14 +02:00
Robert Haschke
907014cd57 Disable pruning by default 2024-07-04 12:05:31 +02:00
Robert Haschke
93a3964138 test_pruning.cpp: Add new test 2024-07-04 11:57:31 +02:00
Robert Haschke
48bde8daab test_pruning.cpp: Extend test to ParallelContainer 2024-07-04 11:57:31 +02:00
Captain Yoshi
3b4ea48c18
Add unittest cartesianCollisionMinMaxDistance (#538)
... to illustrate that MoveRelative's min-max constraint fails with PipelinePlanners (e.g. Pilz) returning a partially invalid trajectory: MTC does not truncate the trajectory to its valid part and thus fails, even if the valid part fits the given min-max range. This logic is only supported for the CartesianPath planner for now.

Co-authored-by: Robert Haschke <rhaschke@techfak.uni-bielefeld.de>
2024-05-27 16:16:57 +02:00
Robert Haschke
92efc14043 Rename ros-planning org 2024-05-25 21:30:30 +02:00
Robert Haschke
7666f73e04
Simplify formatting code with https://github.com/fmtlib (#499)
* Simplify formatting code with https://github.com/fmtlib
* Update to clang-format-12
2024-05-25 19:12:42 +02:00
Robert Haschke
9fd2f1f858 Drop Melodic support
- py_binding_tools is released into Noetic only
- drop Python2 support
- drop TYPED_TEST_CASE
2024-05-23 14:08:49 +02:00
Robert Haschke
55c4b52b13 Cosmetic fixes 2024-03-09 11:11:01 +01:00
Captain Yoshi
5720b83dce
Connect: ensure end-state matches goal state (#532) 2024-02-25 16:58:56 +01:00
Robert Haschke
9dfd6bd2eb Fix duplicate solutions
When adding pending state pairs for a new incoming state to Connect,
we have to re-enable opposite states from ARMED state.
This changes the order of states in the interface.
If we do this while iterating over the states, we might add pairs multiple times,
because iteration continues with same state at an earlier position.
2024-02-15 21:42:18 +01:00
Robert Haschke
13264ba21d Fix leaking of failures into enumerated solutions 2023-10-25 22:21:36 +02:00
Robert Haschke
7b965863e3 Add more debugging output
- Add Stage::introspection() accessor
- Introspection: debug-log solution registration
- RemoteSolutionModel: show internal solution id as tooltip in 1st column
2023-10-25 22:19:49 +02:00
Robert Haschke
08b102d5b0 Unit tests for #485 2023-10-20 09:23:32 +02:00
Robert Haschke
605a1e5419 DelayingWrapper stage to delay solution shipping in unit tests 2023-10-20 09:23:32 +02:00
Robert Haschke
0fd989cb27 Simplify tests 2023-10-13 00:25:39 +02:00
Robert Haschke
b346e7eb78
Task: findChild() and operator[] should directly operate on stages() (#435)
Considering the (fixed) name of the top-level container is meaningless.
2023-05-04 15:23:23 +02:00
JafarAbdi
f055fabbd1 Fix clang-tidy warnings
- Replace old-style casts
- Fix missing initialization
2023-01-04 23:52:38 +01:00
Robert Haschke
7d5f9fe6e3 Fix clang-tidy warnings 2022-11-02 18:44:38 +01:00
Robert Haschke
402d6a4bfe Improve unittest for move_relative 2022-10-31 19:53:07 +01:00
Robert Haschke
28fb974adb Remove MoveIt compatibility code 2022-10-23 22:16:58 +02:00
Jafar
e923fbc0c6
Fix Task's move constructor (#371)
* Add unit test
* Fix TaskPrivate's move assignment operator
* Slightly simplify code

Co-authored-by: Robert Haschke <rhaschke@techfak.uni-bielefeld.de>
2022-06-14 22:13:19 +02:00
Robert Haschke
096c671887 Pruning: Relax too strong assertion: PRUNED => !ARMED
If two Connect stages are sequenced, both sides can become ARMED.
However, that means that the wave of PRUNED status updates, shouldn't
overwrite a present ARMED state.
Added unit test.
2022-03-04 15:01:19 +01:00
Robert Haschke
c7b2067b86 Merge PR #309: Fix Pruning 2022-01-05 20:19:51 +01:00
Robert Haschke
5956e70956 Merge PR #311: fix Fallbacks 2022-01-05 19:49:38 +01:00
Robert Haschke
b2056745a8 Generalize connectStageInsideFallbacks
Let's consider the following simple situation, where generators produce solutions in the given order.

GEN           1 3
Fallbacks     |X
GEN           2 4

When passing state 4 to the Fallbacks' connector, it forms pending pairs with both 1 and 3.
Thus, the container needs to check whether 1-4 or 3-4 was processed when receiving a success or failure,
to correctly forward the failed one to the next child.
2022-01-05 16:37:46 +01:00
Jafar Abdi
7dbe0b87e1
Return MoveItErrorCode from task::plan (#319)
... to know whether the plan failed due to timeout, preemption, or actual planning failure
2022-01-02 15:32:37 +01:00
v4hn
191ff253fd add tests for MoveRelative 2021-12-20 10:19:52 +01:00
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
Robert Haschke
a31e52dd53 Propagate status across Connecting gap
Not only propagate updates along solution paths, but also bridge
the gap of a `Connecting` stage.

- If a state becomes enabled, re-enable opposite `ARMED` states as well.
- If a state becomes pruned, also prune opposite states if they don't have alternatives.
- Make sure that we don't run into a recursive update loop by disabling notify() callbacks.
2021-11-21 14:15:59 +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
52dc494525 Fix test Pruning.NoPruningIfAlternativesExist 2021-11-20 06:24:19 +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
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
JafarAbdi
2d775ffe28 GeneratorMockup: Add solutions_per_compute argument 2021-11-16 22:51:29 +01:00