mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
Pick+Place: Correctly configure forwarding of "pregrasp" property
... from Grasp to UnGrasp stage
This commit is contained in:
parent
d90b566b08
commit
95f24747b0
@ -36,8 +36,11 @@ PickPlaceBase::PickPlaceBase(Stage::pointer&& grasp_stage, const std::string& na
|
||||
return pose;
|
||||
};
|
||||
|
||||
const auto& forwarded_props = grasp_stage->forwardedProperties();
|
||||
|
||||
{
|
||||
auto approach = std::make_unique<MoveRelative>(forward ? "approach object" : "retract", cartesian_solver_);
|
||||
approach->setForwardedProperties(forwarded_props);
|
||||
PropertyMap& p = approach->properties();
|
||||
p.property("group").configureInitFrom(Stage::PARENT, "eef_parent_group");
|
||||
p.property("ik_frame").configureInitFrom(Stage::PARENT, init_ik_frame);
|
||||
@ -52,6 +55,7 @@ PickPlaceBase::PickPlaceBase(Stage::pointer&& grasp_stage, const std::string& na
|
||||
|
||||
{
|
||||
auto lift = std::make_unique<MoveRelative>(forward ? "lift object" : "place object", cartesian_solver_);
|
||||
lift->setForwardedProperties(forwarded_props);
|
||||
PropertyMap& p = lift->properties();
|
||||
p.property("group").configureInitFrom(Stage::PARENT, "eef_parent_group");
|
||||
p.property("ik_frame").configureInitFrom(Stage::PARENT, init_ik_frame);
|
||||
|
||||
@ -60,6 +60,7 @@ SimpleGraspBase::SimpleGraspBase(const std::string& name) : SerialContainer(name
|
||||
void SimpleGraspBase::setup(std::unique_ptr<Stage>&& generator, bool forward) {
|
||||
// properties provided by the grasp generator via its Interface or its PropertyMap
|
||||
const std::set<std::string>& grasp_prop_names = { "object", "eef", "pregrasp", "grasp" };
|
||||
this->setForwardedProperties(grasp_prop_names);
|
||||
|
||||
// insert children at end / front, i.e. normal or reverse order
|
||||
int insertion_position = forward ? -1 : (generator ? 1 : 0);
|
||||
|
||||
@ -98,7 +98,6 @@ place_generator.pose = placePose
|
||||
|
||||
# The SimpleUnGrasp container encapsulates releasing the object at the given Cartesian pose
|
||||
simpleUnGrasp = stages.SimpleUnGrasp(place_generator, "UnGrasp")
|
||||
simpleUnGrasp.pregrasp = "open"
|
||||
|
||||
# Place container comprises placing, ungrasping, and retracting
|
||||
place = stages.Place(simpleUnGrasp, "Place")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user