Commit Graph

872 Commits

Author SHA1 Message Date
v4hn
2153237643 clang-format: readability-identifier-naming
Probably the most invasive format patch, also changing some internal API.

I deliberately disabled ClassCase and MethodCase checks for the moment
to avoid public API changes in this patch set.
2020-06-11 11:03:50 +02:00
v4hn
fa041ed2e6 clang-format: readability-container-size-empty 2020-06-11 11:03:50 +02:00
v4hn
b762079478 clang-tidy: readability-named-parameters 2020-06-11 11:03:50 +02:00
v4hn
5da2df4c61 clang-tidy: modernize-use-nullptr 2020-06-11 11:03:50 +02:00
v4hn
48f4c025ba clang-tidy: modernize-loop-convert 2020-06-11 11:03:50 +02:00
v4hn
3fe4436ad7 clang-tidy: modernize-use-override 2020-06-11 11:03:50 +02:00
v4hn
36166348bc clang-tidy: use using over typedef
$ run-clang-tidy.py -header-filter='.*' -checks='modernize-use-using' -fix

add .clang-tidy file
2020-06-11 11:03:50 +02:00
v4hn
c662311a78 grant access to subsolutions of a sequence
SubTrajectory allows to access the trajectory,
but for SolutionSequence is was not needed until now.
2020-06-11 11:03:50 +02:00
v4hn
98cac4fd7c add informative comment 2020-06-11 11:03:50 +02:00
v4hn
9f07cf5e97 shorten task id if Task object has no name 2020-06-11 11:03:50 +02:00
v4hn
ebf7b751d2 do not reset on plan
users can reset explicitly as needed.
Reset sends ROS messages and prevents { plan(1); plan(1) } style usage.
2020-06-11 11:03:50 +02:00
v4hn
7270a658af connect to statistics *after* first description
This avoids the case where we would asynchronously receive the statistics
*before* the description and wouldn't know what to do with it.
2020-06-11 11:03:50 +02:00
v4hn
701589b651 simplify reading
my eyes hurt trying to cope with it.first->second .
2020-06-11 11:03:50 +02:00
v4hn
b9839a3f22 check for valid robot model
Also, no need to reset() unless the model is different and not the first.
2020-06-11 11:03:50 +02:00
v4hn
b27939cb27 fix typo 2020-06-11 11:03:50 +02:00
v4hn
d224097f3f extend comment on unintuitive setter 2020-06-11 11:03:50 +02:00
Michael Görner
466bd79b73
Use MoveIt's codecov configuration (#173) 2020-06-11 10:43:01 +02:00
Jafar Abdi
b3b215a4f7
Add ability to add/remove objects to/from planning scene (#165) 2020-05-05 18:28:54 +02:00
Aris Synodinos
2d99017c17
Fix for GCC5 (Ubuntu 16.04 / Kinetic) call to non-constexpr function (#163)
Co-authored-by: Aris Synodinos <aris.synodinos@unibap.com>
2020-04-22 11:48:08 +02:00
v4hn
72af8bc94b add convenience includes 2020-04-18 21:04:57 +02:00
v4hn
05ce4d796b expose group property 2020-04-17 18:48:18 +02:00
Robert Haschke
a939358d40 Remove accidentally committed files 2020-04-14 21:24:00 +02:00
Robert Haschke
1f8dae86dd Merge #156: Rework interface resolution 2020-04-10 22:44:59 +02:00
Robert Haschke
c4d0ab0636 SerialContainer: Resolve interfaces of all stages 2020-04-10 20:25:54 +02:00
Robert Haschke
499fcfb04b cleanup / renaming
* Rename pruneInterface() -> resolveInterface()
* Rename accepted (interface) -> expected
* Improve exception strings
2020-04-10 20:11:51 +02:00
Robert Haschke
aa732d8c66 simplify internal API 2020-04-10 19:59:27 +02:00
Robert Haschke
e56c772ecb Combine pruneInterface() + validateConnectivity()
Validate interfaces during resolution. No need to separately validate interfaces.
Thus, validateConnectivity() is removed from Task::init().
Functions are kept (but simplified) for unit testing.
2020-04-10 19:59:27 +02:00
Robert Haschke
10260b9dd7 Further simplify interface resolution
* Do not modify explicitly configured direction of Propagator
* Avoid code duplication in pruneInterface() and validateConnectivity()
  Only implement pruneInterface() for stages that actually need to adapt their interface.
2020-04-10 19:59:23 +02:00
Robert Haschke
4d8d32dda5 New test: keep previously configured propagate interface 2020-04-10 19:39:32 +02:00
Robert Haschke
9116e92d08 minor cleanup, fixing warnings, improving comments 2020-04-10 19:39:32 +02:00
Robert Haschke
a98d5ed8ae templated flowSymbol<input/output mask>(flags)
* Enforce at compile time that either input or output flags are considered.
* Use horizontal flow symbols (as in console output).
* Replace redundant direction(flags).
2020-04-10 19:39:32 +02:00
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