Goal - Make Pepper go somewhere. The robot will try to reach safely the target location, while avoiding obstacles. The robot may look around and follow non-straight paths, in order to choose the safest way towards the target.
// Get the target frame. Frame targetFrame = ...; // Build the action. GoTo goTo = GoToBuilder.with(qiContext) .withFrame(targetFrame) .build(); // Run the action synchronously. goTo.run();
Typical usage - You want Pepper to find a path to reach a target location.
How it works¶
Move to a static target¶
You want Pepper to reach the point located one meter in front of him.
Retrieve the robot frame and define the target location relatively to Pepper current location:
Actuation actuation = qiContext.getActuation(); Frame robotFrame = actuation.robotFrame(); Transform transform = TransformBuilder.create() .fromXTranslation(1); Mapping mapping = qiContext.getMapping(); FreeFrame targetFrame = mapping.makeFreeFrame(); // Pass a 0-timestamp to publish target relatively to the // last known location of robotFrame. targetFrame.update(robotFrame, transform, 0L); GoTo goTo = GoToBuilder.with(qiContext) .withFrame(targetFrame.frame()) .build(); goTo.run();
Performance & Limitations¶
Pepper is able to avoid obstacles while moving to a specific location. If there are obstacles on his way, he will try to get around them to reach his destination.