From f831fe54832023262052a340316c86bb78b4d527 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Sun, 10 Mar 2019 23:26:53 +0100 Subject: [PATCH] fix comments + typos --- core/include/moveit/task_constructor/stage_p.h | 14 ++++++++++---- core/src/container.cpp | 9 +++++---- core/src/stage.cpp | 2 +- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/core/include/moveit/task_constructor/stage_p.h b/core/include/moveit/task_constructor/stage_p.h index 9d668f30..78e77980 100644 --- a/core/include/moveit/task_constructor/stage_p.h +++ b/core/include/moveit/task_constructor/stage_p.h @@ -56,16 +56,22 @@ class StagePrivate { friend std::ostream& operator<<(std::ostream& os, const StagePrivate& stage); public: - // container type used to store children + /// container type used to store children typedef std::list container_type; StagePrivate(Stage* me, const std::string& name); virtual ~StagePrivate() = default; + /// actually configured interface of this stage (only valid after init()) InterfaceFlags interfaceFlags() const; - // retrieve description of the interface required by this stage - // if this is unknown (because interface is auto-detected from context), return 0 + + /** Interface required by this stage + * + * If the interface is unknown (because it is auto-detected from context), return 0 */ virtual InterfaceFlags requiredInterface() const = 0; - // prune interface to the given propagation direction + + /** Prune interface to comply with the given propagation direction + * + * PropagatingEitherWay uses this in restrictDirection() */ virtual void pruneInterface(InterfaceFlags accepted) {} virtual bool canCompute() const = 0; diff --git a/core/src/container.cpp b/core/src/container.cpp index 76338ca7..91d956ef 100644 --- a/core/src/container.cpp +++ b/core/src/container.cpp @@ -367,8 +367,8 @@ SerialContainerPrivate::SerialContainerPrivate(SerialContainer *me, const std::s : ContainerBasePrivate(me, name) {} -// a serial container's required interface is derived from the required input interface -// of the first child and the required output interface of the last child +// a serial container's required interface is derived from the actual input interface +// of the first child and the actual output interface of the last child InterfaceFlags SerialContainerPrivate::requiredInterface() const { if (children().empty()) @@ -424,7 +424,8 @@ void SerialContainer::init(const moveit::core::RobotModelConstPtr& robot_model) impl->starts_.reset(); impl->ends_.reset(); - ContainerBase::init(robot_model); // throws if there are no children + // recursively init all children, throws if there are no children + ContainerBase::init(robot_model); auto start = impl->children().begin(); auto last = --impl->children().end(); @@ -582,7 +583,7 @@ void SerialContainer::validateConnectivity() const // start pull interface fed? if (cur != impl->children().begin() && // first child has not a previous one (required & READS_START) && !(*prev)->pimpl()->nextStarts()) - errors.push_back(**cur, "end interface is not fed"); + errors.push_back(**cur, "start interface is not fed"); // end pull interface fed? if (next != end && // last child has not a next one diff --git a/core/src/stage.cpp b/core/src/stage.cpp index 15cdc9b4..1ed760c0 100644 --- a/core/src/stage.cpp +++ b/core/src/stage.cpp @@ -519,7 +519,7 @@ void PropagatingEitherWay::init(const moveit::core::RobotModelConstPtr& robot_mo // pretend that we offer both interface directions during init(). // This is needed due to a chicken-egg-problem: interface auto-detection requires // the context (external pushing interfaces prevEnds, nextStarts) to be set, - // while the are ony set if we detected the correct interface... + // while they are ony set if we detected the correct interface... if (impl->required_interface_dirs_ == AUTO) impl->initInterface(BOTHWAY); // otherwise the interface is already fixed and well-defined