Commit Graph

875 Commits

Author SHA1 Message Date
Robert Haschke
6c18e2b482 test comparison of ConnectingPrivate's StatePairs 2021-03-22 14:42:23 +01:00
Robert Haschke
2a09daa42f InterfaceState::Priority::enabled()
To allow pruning, we need to enable and disable InterfaceStates to be considered for further
planning. In the past, we just indicated the disabled status with infinite costs.
However, because we might need to re-enable states (with previous state),
we need to separate these two concepts.
2021-03-22 14:42:23 +01:00
v4hn
f59e5170fb drop useless assert 2021-03-22 14:39:35 +01:00
v4hn
fc5c25670d Fix duplicated layout name
Fixes https://github.com/ros-planning/moveit_task_constructor/issues/227
2021-03-22 14:38:30 +01:00
Robert Haschke
44eaf9975e rviz: catch + display invalid-robot-model exception 2021-03-19 18:22:04 +01:00
Robert Haschke
10f6b7a58e MoveTo/MoveRel: reduce code duplication
... using templated versions for computeForward + computeBackward
as they essentially perform the same operations.
2021-03-19 18:22:04 +01:00
Robert Haschke
dfffd77eee MoveTo/MoveRel: Report errors via solution comments instead of ROS_WARN 2021-03-19 18:22:04 +01:00
Robert Haschke
5de9ce7203 Perform clang-format check via github action from pre-commit.com 2021-03-15 14:29:19 +01:00
Robert Haschke
0b63c590c5 Replace MoveIt! -> MoveIt 2021-03-15 14:29:19 +01:00
v4hn
1f86f73c06 add two demos for cost computation aspects 2021-03-05 21:41:07 +01:00
v4hn
ee2d768012 simplify demo startup launch
There's no need to copy the whole demo.launch from the panda config.
2021-03-05 14:54:13 +01:00
v4hn
3d8faea079 add test to validate correct solution state in computeCost
This is somewhat cumbersome because of the additional internal/external
layer introduced through the container.
But it's still better than leaving this unverified.
2021-03-05 14:38:29 +01:00
v4hn
f4fb8c6f71 fix computeCost interface (again)
Fixes the missing creator pointer introduced in a6a23d3775
2021-03-05 14:38:23 +01:00
v4hn
629d266fbc remove leftover joint counting
Not used anywhere
2021-03-05 14:38:14 +01:00
v4hn
f7a94956c3 output stream formatting for InterfaceState::Priority 2021-03-05 14:38:06 +01:00
Robert Haschke
a6fa45214f Remove return value from Container::insert
adapted Container::add

Logical consequence of removing the ROS_ERROR output in `setParent`
2021-02-24 12:22:38 +01:00
v4hn
4386d0cc60 remove roscpp as an export dependency for the core package
We do use ROS in the background. But there is no need for a public export dependency on it.

This patch also resolves the following catkin_lint issue:

moveit_task_constructor_core: CMakeLists.txt(17): error: package 'roscpp' must be in CATKIN_DEPENDS in catkin_package()
2021-02-24 12:22:38 +01:00
Robert Haschke
685fec6070
demo: switch to moveit_resources_panda_moveit_config (#231) 2021-02-18 11:57:59 +01:00
Robert Haschke
f2d2cf10f0 Fallback: Correctly end iterating children
Fixes #234
2021-02-17 21:17:05 +01:00
Robert Haschke
f99d03386a
Use RobotModelBuilder to simplify tests (#225)
* Simplify RobotModel definition using RobotModelBuilder
* Silent RobotModel errors once in models.cpp
2020-12-30 11:07:57 +01:00
Jafar Abdi
8a913d8bf3
getTaskId(): Replace '-' in hostname with '_' (#223) 2020-12-15 20:39:01 +01:00
Robert Haschke
9f18219993 minor cleanups
* unify usage of pimpl()
* fix StatePair constructors
* improve/add comments
* test_container: reset MOCK_ID for each test to facilitate identification of stages
2020-12-06 23:55:58 +01:00
Robert Haschke
0925031a81 Propagating: disable infeasible state pruning
Because stages might get re-enabled later, we must not throw them away.
Remove dropFailedStarts(), dropFailedEnds().
Extend Pruning unittest.
2020-12-06 23:55:10 +01:00
Robert Haschke
a6a23d3775 Remove set[Start|End]StateUnsafe
These methods were introduced to temporarily set meaningful states for cost calculation
w/o connecting the solution to these temporary states (to solve a chicken-egg problem).
This commit provides TmpInterfaceStateProvider as an alternative approach to this problem.

This essentially reverts 53c0964618.
2020-12-06 04:11:35 +01:00
Robert Haschke
c8e75ab205 Simplify SolutionCollector 2020-12-06 04:11:35 +01:00
Robert Haschke
576a1aa48d Remove default constructor for Priority
It's better to explicitly state the initial value.
2020-12-06 04:11:35 +01:00
Robert Haschke
56ad37d80e Provide move constructor for InterfaceState
The code was tuned to move InterfaceStates around, but there wasn't the matching constructor!
2020-12-06 04:11:35 +01:00
Robert Haschke
bc25c5e3c1 Modernize: require cmake version 3.1.3 2020-12-06 04:11:35 +01:00
Robert Haschke
5d4cf640ef Fix issues #182 + #218 2020-12-06 04:10:47 +01:00
Robert Haschke
a9cd4e3281 Connect: Decouple subsolutions of SolutionSequence from external interface states 2020-12-06 04:09:59 +01:00
Robert Haschke
f05b08fa8a SerialContainer: Simplify solution traversal
Compute depth + accumulated cost of a partial solution sequence using InterfaceState::Priority.
2020-12-06 04:09:59 +01:00
Robert Haschke
11647fd3e5 Connect: mark failures in sub solutions of a sequence 2020-12-06 04:09:59 +01:00
Robert Haschke
c73c0c3555 Interface::updatePriority(): only allow decrease 2020-12-06 04:06:08 +01:00
Robert Haschke
08dc19f7b3 Fix cost calculation
The default CostTerm should rely on precomputed costs. Only, if a CostTerm is explicitly defined
for a particular stage, it should modify costs.
2020-12-06 04:06:08 +01:00
Robert Haschke
66fdff9711 Simplify state priority updates
Only need to update the end points of a partial solution.
2020-12-06 04:06:08 +01:00
Robert Haschke
5fd98ce307 SerialContainer tests 2020-12-06 04:06:08 +01:00
Robert Haschke
fe189cd692 Test Interface::updatePriority() 2020-12-06 04:06:08 +01:00
Robert Haschke
ef9c7612a9 Fix (again) creation of TaskPanel 2020-10-30 00:44:51 +01:00
Robert Haschke
f7ea72010b Fix ambiguous member initialization 2020-10-30 00:44:51 +01:00
Robert Haschke
bfa2a6070d MoveTo: Publish failed planning attempts 2020-10-30 00:44:51 +01:00
Robert Haschke
e83a5ecefa Configurable handling of old remote tasks
- keep all previous tasks
- replace with next task of same id
- always remove
2020-10-30 00:44:51 +01:00
Robert Haschke
ae843a784e Merge PR #214 (fix various issues) and #215 (rework rviz introspection) 2020-10-24 04:45:53 +02:00
Robert Haschke
cf5031e89d Create task-specific ServiceClients to fetch solutions
This finally allows to have multiple tasks publishing in the same namespace.
2020-10-24 04:43:30 +02:00
Robert Haschke
b91d87c6eb IntroSpection: indicateReset() on disable 2020-10-24 04:43:30 +02:00
Robert Haschke
8b1c66c4b7 Allow naming a Task
which just names the top-level container
2020-10-24 04:43:30 +02:00
Robert Haschke
c471879b08 Rename process_id -> task_id 2020-10-24 04:43:30 +02:00
Robert Haschke
b071a059f9 Rename TaskPrivate::id -> TaskPrivate::ns
TaskPrivate's id_ actually served as a namespace parameter.
2020-10-24 04:43:30 +02:00
Robert Haschke
3a7a4eb953 Connect: Fix segfault when accessing solutions from multiple plan() calls
Connect::init() was resetting its dynamically created JMG merged_jmg_,
thus invalidating all previous solutions. Only reset the JMG in reset().
2020-10-24 03:23:19 +02:00
Robert Haschke
c7151dcc48 Remove mainloop jobs
All topics are handled by the Display's update_nh_ within the main GUI thread anyway.
2020-10-24 03:23:19 +02:00
Robert Haschke
d78048719d Fix memory leakage 2020-10-24 03:23:19 +02:00