I’m using as example createfeatureswing to create feature.
void createFeature() {
userInterfaceAPI.getUserInteraction().getUserDefinedRobotPosition(new RobotPositionCallback2() {
@Override
public void onOk(PositionParameters positionParameters) {
Feature feature = featureContributionModel.addFeature(createFeatureKeys(), SUGGESTED_FEATURE_NAME, positionParameters.getPose());
model.set(FEATURE_KEY, feature);
// joint positions are not part of the feature. They are only used by the program node, for creating waypoints
model.set(FEATURE_JOINT_ANGLES_KEY, positionParameters.getJointPositions());
view.featureIsCreated(true);
}
});
}
How can I create the pose inside installation node with coordinates p[0.0,0.0,0.0,0.0,0.0,0.0]?
Also can I modify this adding outside the public void onOk a feature with a position that I create with coordinates that I set?
One thing to note ahead of time: There is nothing special about a Feature. It’s just a Pose in space. Just doing
writer.appendLine(global myFeaturePose = p[0,0,0,0,0,0]");
Is valid and can be used programmatically as you would a Feature.
Now, to create a Feature that you can select from the nice dropdowns in Polyscope, you can do something like this, calling it from the constructor of your installation node, for example: