Commit Graph

941 Commits

Author SHA1 Message Date
Robert Haschke
7f33633e82 Simplify test_container.cpp
* Reset mock_id for each test to facilitate assignment
* Simplify creation of nested containers
* Moved some test cases around
* Output all exception messages (even expected ones)
2020-04-10 19:34:51 +02:00
Jafar Abdi
b4fb8bb435
Allow constructing PipelinePlanner from PlanningPipelinePtr (#155) 2020-04-08 17:36:02 +02:00
v4hn
b6a5f89307 remove logical flow BOTH / simplify pruning
The PROPAGATE concept BOTH declared the stages *will* propagate solutions in
either direction. ANY, on the other hand, only means the propagation
direction is *not resolved yet* (but will be at planning time).

BOTH was originally described to support a more general control flow
than was eventually decided to support. The four exclusive Stage interfaces
CONNECT, PROPAGATE_FORWARDS, PROPAGATE_BACKWARDS, and GENERATOR
do not allow for BOTH as a valid setup anymore, unless you setup a very
convolved task like `Alternatives(GEN, PROP) - Alternatives(PROP, GEN)`
which would be very complex to inspect. The same functionality can still
be achieved more readable as `Alternatives(Seq(GEN, PROP), Seq(PROP, GEN))`.

The confusion between BOTH (propagator *will* send in both directions) and
ANY (propagator will send in *either* direction, decided during init) led
to a lot of confusion with users and was not fully accounted
throughout the pipeline.

Adjust tests.

Notice the difference between ANY (unresolved propagator) and UNKNOWN
(a container before introspecting its children). propagators still
report UNKNOWN as requiredInterface though to simplify control flow.

The simplification enables a much simpler linear inference of the connective
structure of a task, as the first interface direction is always given.

Additionally, unify the resource setup for static interfaces to run
in the constructor, and for dynamic initialization in `pruneInterface`,
getting rid of partial initializations in `init`.
2020-04-08 13:27:36 +02:00
v4hn
a193fc2ec5 enumerate test stages
remove ambiguity when multiple stages of the same type are used
2020-04-08 13:27:28 +02:00
v4hn
5ae7e54732 treat empty container as init exception 2020-04-08 13:27:21 +02:00
v4hn
87d70a5da1 minor documentation improvements 2020-04-08 13:27:14 +02:00
Robert Haschke
4cb390b187
Merge #154: Fix solution execution from rviz 2020-04-08 08:52:55 +02:00
Robert Haschke
dadb2c1bf1 Travis: switch to melodic-source docker container
... to build against latest MoveIt melodic-devel branch
2020-04-07 23:48:08 +02:00
v4hn
b0df621f66 bump cmake version
get rid of CMP0048 warning.
2020-04-03 12:14:57 +02:00
Robert Haschke
0725f81603 fix rviz solution execution
Store the set of joints involved in a received trajectories and
use this set to constrain serialization of solutions for execution to those joints only.
If this is not done, all joints of the RobotModel are considered for the trajectory,
but we might not have controllers defined for all joints, so execution will fail.

Maybe, a better approach might be to just ask the MTC planner to execute a specific solution id.
However, this requires that the planner node is still available.
2020-04-03 11:58:55 +02:00
Robert Haschke
f1acfa2f7e
Merge pull request #151: Various fixes 2020-04-03 11:58:19 +02:00
Robert Haschke
b26576dddc fix include order
As INCLUDE_DIRECTORIES of target_link_libraries always go AFTER those from target_include_directories,
we need to explicitly provide the include order for local targets.
2020-04-03 11:36:05 +02:00
v4hn
00331414a6 merge: update states only once per waypoint 2020-04-03 11:36:05 +02:00
Robert Haschke
8834ce18f7 simplify trajectory merging
avoid code duplication: reuse merge(std::vector<JointModelGroup*>)
2020-04-03 11:36:05 +02:00
Robert Haschke
718ad320c2 cartesian demo: illustrate merging of trajectories 2020-04-03 11:36:05 +02:00
Robert Haschke
8debe68f99 fix joint_interpolation
- return a trajectory in any case (even if there is no motion needed)
- check feasability of goal pose
2020-04-03 11:36:05 +02:00
Michael Görner
5f00f6026f
update travis config (#152)
- change old keys
- add clang compiler for master build
2020-04-01 17:05:02 +02:00
v4hn
07f62aa72f add override in Task
I very much considered just removing the protected inheritance again,
but it would add unnecessary code duplication.

Take note, the overriding `insert` function bypasses the Wrapper and directly forwards to the wrapped container.
This is somewhat dirty and could be an issue for anyone inheriting from `Task`.
2020-04-01 15:05:20 +02:00
v4hn
7cd82d5c04 resolve clang warnings & suggestions 2020-04-01 15:05:20 +02:00
v4hn
8578a64ac0 correct sign for StageCallback type
backward compatible, the function type implicitly converts from previous int definitions.
2020-04-01 15:05:20 +02:00
v4hn
cc86dd8a74 rename Task::erase -> eraseTaskCallback
`erase` is too general for a container class,
when it's not actually about erasing children or the container itself.
2020-04-01 15:05:20 +02:00
v4hn
c046ec605d streamline add/insert interfaces for Task/Container
`add` falls back to `insert` for both structures,
but `add` throws exceptions and does not provide a return value.

`insert` provides standard STL container access.
2020-04-01 15:05:20 +02:00
v4hn
df8a783239 enforce one-parent policy in StagePrivate
So new containers cannot get this wrong by accident.
2020-04-01 15:05:20 +02:00
Michael Görner
90f5d22e83
do not export inline functions (#147)
This makes sure that code using `pimpl()` will not compile out of the box unless the _p header is included.
2020-03-29 20:47:26 +02:00
Michael Görner
0eae0e652e
build tests using gmock via catkin_add_gmock (#148)
Otherwise these suddenly started to fail for me on Lunar Linux...
2020-03-20 20:33:33 +01:00
Michael Görner
d61e1708ce
Add an icon for the RViz interface (#144) 2020-03-19 08:46:39 +01:00
v4hn
194715abc6 limit float values in rviz to 4 digits
The previous implicit conversion leads to varying cell width.
2020-03-13 12:09:39 +01:00
Michael Görner
a9fbcac31f
planning_attempts -> max_solutions (#143)
The parameter describes the maximum number of found solutions before further planning is aborted.
2020-03-10 15:00:22 +01:00
v4hn
f12cc0c127 Revert "workaround for MoveIt PlanningScene bug"
Fixed via https://github.com/ros-planning/moveit/pull/1899.
Please use *latest* master (if you do not use melodic builds).

This reverts commit c44d0cac19.
2020-03-09 10:09:01 +01:00
v4hn
8f56d4ae79 avoid copy from const id reference
This mustn't compile as users got confused about it:
```
Task t;
t.id() = "foobar";
```
2020-03-05 12:08:59 +01:00
Robert Haschke
5944c21016
Add qtbase5-dev build dependency (#142) 2020-03-05 08:04:50 +01:00
Robert Haschke
9ee653453d Container: abort traversal with false return value of processor
So far, returning false from the processor function, just skipped further traversing the current child (depth-wise).
Now, traversal is completely aborted, even not traversing the remaining siblings of the current child.
Having a single boolean return value, we cannot distinguish both cases.
We need the new behaviour for 8061945c15bea22e8f8899c987bc28e3542885aa.
2020-03-03 17:57:06 +01:00
Robert Haschke
5037bc77e7 Use public API only in visualization package 2020-03-03 17:57:06 +01:00
Mark Moll
0d6f79050a don't install PIMPL header files (#119) 2020-03-03 17:21:54 +01:00
Markus Vieth
534d520a04
Add return value to Task::execute (#136) 2020-02-20 11:31:51 +01:00
Robert Haschke
c44d0cac19 workaround for MoveIt PlanningScene bug
https://github.com/ros-planning/moveit/issues/1835
2020-02-18 09:31:48 +01:00
Robert Haschke
bcc652b6e8 cleanup demo 2020-02-18 09:30:27 +01:00
Aris Synodinos
8ac9957b55
Added C++11 flags for MOVEIT_MASTER check (#129) 2020-02-12 21:59:33 +01:00
Robert Haschke
7cda8e38d6 add missing Ogre includes 2020-02-06 17:31:10 +01:00
Robert Haschke
46805e2666 Fixup: avoid deprecation warnings of MoveIt master branch
Fixes missing definition of MOVEIT_MASTER for capabilities packages
in 233d63aa7a
2020-02-06 17:29:51 +01:00
Robert Haschke
919531bc29 shorten description of trajectory component
info's id and stage_id are not always filled
2020-02-06 17:29:51 +01:00
Robert Haschke
463486257b Merge #120: Add computation timing 2020-02-06 16:18:49 +01:00
Jafar Abdi
fa9b177575 transmit and display computation in rviz 2020-02-06 16:18:20 +01:00
Jafar Abdi
aa11b66824 use runCompute() 2020-02-06 16:17:55 +01:00
Jafar Abdi
89fea00b33 Stage::runCompute() to measure computation time 2020-02-06 16:17:04 +01:00
Rajendra Singh
8588deb202 Printing success log only if execution completes
Previous code will print/log "Execution complete" even if the execution was disabled.
2020-02-05 13:18:33 +01:00
Rajendra Singh
de79dedbfc
Generalised code for object_name
Previous code was generating the error on changing object_name in config/panda_config.yaml file because of this bug as here we are overwriting the object_name as "object" which brought the inconsistency in code.
2020-01-16 19:05:53 +05:30
Robert Haschke
ef6cb1a746 TaskPanel: execute selected solution 2020-01-11 09:15:11 +01:00
Robert Haschke
ba815cff34 Task: don't publish solutions by default
Having multiple solutions, automatic publishing of intermediate solutions is confusing.
One never knows, which one is the final one. If desired, the user should setup a hook for this.
2020-01-11 09:00:34 +01:00
Henning Kayser
c1f6ca8e84 Expose SolutionCallback API in Task (#121) 2020-01-11 08:33:57 +01:00