mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
minor improvements: variable names, comments
This commit is contained in:
parent
564f3b0514
commit
51e1dda6ec
@ -106,7 +106,7 @@ public:
|
|||||||
InterfaceState(const planning_scene::PlanningSceneConstPtr& ps);
|
InterfaceState(const planning_scene::PlanningSceneConstPtr& ps);
|
||||||
|
|
||||||
/// copy an existing InterfaceState, but not including incoming/outgoing trajectories
|
/// copy an existing InterfaceState, but not including incoming/outgoing trajectories
|
||||||
InterfaceState(const InterfaceState& existing);
|
InterfaceState(const InterfaceState& other);
|
||||||
|
|
||||||
inline const planning_scene::PlanningSceneConstPtr& scene() const { return scene_; }
|
inline const planning_scene::PlanningSceneConstPtr& scene() const { return scene_; }
|
||||||
inline const Solutions& incomingTrajectories() const { return incoming_trajectories_; }
|
inline const Solutions& incomingTrajectories() const { return incoming_trajectories_; }
|
||||||
|
|||||||
@ -867,7 +867,7 @@ void ParallelContainerBase::spawn(InterfaceState &&state, SubTrajectory&& t)
|
|||||||
it->setEndState(*state_it);
|
it->setEndState(*state_it);
|
||||||
impl->failures_.push_back(&*it);
|
impl->failures_.push_back(&*it);
|
||||||
} else {
|
} else {
|
||||||
// directly spawn states in push interfaces
|
// directly spawn states into push interfaces
|
||||||
impl->prevEnds()->add(InterfaceState(state), NULL, &*it);
|
impl->prevEnds()->add(InterfaceState(state), NULL, &*it);
|
||||||
impl->nextStarts()->add(std::move(state), &*it, NULL);
|
impl->nextStarts()->add(std::move(state), &*it, NULL);
|
||||||
impl->solutions_.insert(&*it);
|
impl->solutions_.insert(&*it);
|
||||||
|
|||||||
@ -50,8 +50,8 @@ InterfaceState::InterfaceState(const planning_scene::PlanningSceneConstPtr &ps)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
InterfaceState::InterfaceState(const InterfaceState &existing)
|
InterfaceState::InterfaceState(const InterfaceState &other)
|
||||||
: scene_(existing.scene_), properties_(existing.properties_)
|
: scene_(other.scene_), properties_(other.properties_)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ Interface::iterator Interface::add(InterfaceState &&state, SolutionBase* incomin
|
|||||||
// move state to a list node
|
// move state to a list node
|
||||||
std::list<InterfaceState> container;
|
std::list<InterfaceState> container;
|
||||||
auto it = container.insert(container.end(), std::move(state));
|
auto it = container.insert(container.end(), std::move(state));
|
||||||
assert(it->owner_ == nullptr);
|
assert(it->owner_ == nullptr); // state can only be added once to an interface
|
||||||
it->owner_ = this;
|
it->owner_ = this;
|
||||||
|
|
||||||
// configure state: inherit priority from other end's state and add current solution's cost
|
// configure state: inherit priority from other end's state and add current solution's cost
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user