mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
remove Container::exposePropertiesOfChild()
This commit is contained in:
parent
157caac385
commit
2e46082521
@ -62,12 +62,6 @@ public:
|
||||
virtual bool remove(int pos);
|
||||
virtual void clear();
|
||||
|
||||
/// declare all given variables of child and configure child to inherit them from parent
|
||||
void exposePropertiesOfChild(int child, const std::initializer_list<std::string>& names, bool skip_undefined = false);
|
||||
/// declare given child property with another name and configure child to inherit it from parent
|
||||
void exposePropertyOfChildAs(int child, const std::string& child_property_name,
|
||||
const std::string& parent_property_name, bool skip_undefined = false);
|
||||
|
||||
void reset() override;
|
||||
void init(const moveit::core::RobotModelConstPtr& robot_model) override;
|
||||
/// validate connectivity of children (after init() was done)
|
||||
|
||||
@ -194,40 +194,6 @@ void ContainerBase::clear()
|
||||
pimpl()->children_.clear();
|
||||
}
|
||||
|
||||
void ContainerBase::exposePropertiesOfChild(int child, const std::initializer_list<std::string>& names, bool skip_undefined)
|
||||
{
|
||||
auto impl = pimpl();
|
||||
ContainerBasePrivate::const_iterator child_it = impl->childByIndex(child, false);
|
||||
if (child_it == impl->children().end())
|
||||
throw std::runtime_error("invalid child index");
|
||||
|
||||
PropertyMap &source = (*child_it)->properties();
|
||||
PropertyMap &target = impl->properties_;
|
||||
for (const std::string& name : names) {
|
||||
if (skip_undefined && !source.hasProperty(name))
|
||||
continue;
|
||||
// declare variables
|
||||
source.exposeTo(target, name, name);
|
||||
}
|
||||
}
|
||||
|
||||
void ContainerBase::exposePropertyOfChildAs(int child, const std::string& child_property_name,
|
||||
const std::string& parent_property_name, bool skip_undefined)
|
||||
{
|
||||
auto impl = pimpl();
|
||||
ContainerBasePrivate::const_iterator child_it = impl->childByIndex(child, false);
|
||||
if (child_it == impl->children().end())
|
||||
throw std::runtime_error("invalid child index");
|
||||
|
||||
PropertyMap &source = (*child_it)->properties();
|
||||
PropertyMap &target = impl->properties_;
|
||||
if (skip_undefined && !source.hasProperty(child_property_name))
|
||||
return;
|
||||
|
||||
// declare variables
|
||||
source.exposeTo(target, child_property_name, parent_property_name);
|
||||
}
|
||||
|
||||
void ContainerBase::reset()
|
||||
{
|
||||
auto impl = pimpl();
|
||||
|
||||
@ -78,7 +78,6 @@ void SimpleGraspBase::setup(std::unique_ptr<Stage>&& generator, bool forward)
|
||||
p.configureInitFrom(Stage::PARENT | Stage::INTERFACE, {"eef", "ik_frame"}); // derive from both
|
||||
p.exposeTo(properties(), { "max_ik_solutions", "timeout", "ik_frame" });
|
||||
insert(std::unique_ptr<ComputeIK>(ik), insertion_position);
|
||||
// exposePropertiesOfChild(insertion_position, { "max_ik_solutions", "timeout", "ik_frame" });
|
||||
}
|
||||
{
|
||||
auto allow_touch = new ModifyPlanningScene(forward ? "allow object collision" : "forbid object collision");
|
||||
@ -116,7 +115,6 @@ void SimpleGraspBase::setup(std::unique_ptr<Stage>&& generator, bool forward)
|
||||
p.property("goal").configureInitFrom(Stage::PARENT | Stage::INTERFACE, forward ? "grasp" : "pregrasp");
|
||||
p.exposeTo(properties(), { "group", "goal" });
|
||||
insert(std::unique_ptr<MoveTo>(move), insertion_position);
|
||||
// exposePropertyOfChildAs(insertion_position, "goal", forward ? "grasp" : "pregrasp", true);
|
||||
}
|
||||
{
|
||||
auto attach = new ModifyPlanningScene(forward ? "attach object" : "detach object");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user