|
IK to compute trajectory for a pointing gesture. More...
#include <armarx/control/pointing/core/PointingIK.h>
Public Member Functions | |
armarx::TrajectoryPtr | getTrajectory () |
Constructs a trajectory containing the sequence of joint configurations from the calls to optimize(). More... | |
bool | isTargetReached () |
double | optimize () |
Optimizes the joint configuration of the internal robot model regarding pointing towards the target. More... | |
PointingIK (VirtualRobot::RobotPtr robot, Side side, Eigen::Vector3f &target) | |
Initialize a new PointingIK. More... | |
IK to compute trajectory for a pointing gesture.
Wrapper for simox-control's method::example::PointingIK. Computes a trajectory for a pointing gesture that lines up the forearm with a target. Uses the robot's human mapping to obtain relevant joints: All arm-joints until (excluding) the wrist are being used.
This class keeps an internal robot model. Each call to optimize() optimizes the joint configuration regarding pointing towards the target. isTargetReached() returns whether the robot in the latest configuration already points at the target. getTrajectory() returns the sequence of generated configurations as Trajectory.
Example usage:
Definition at line 39 of file PointingIK.h.
PointingIK | ( | VirtualRobot::RobotPtr | robot, |
Side | side, | ||
Eigen::Vector3f & | target | ||
) |
Initialize a new PointingIK.
robot | Robot model with current robot configuration to be used by the IK. Must provide a human mapping. |
side | Side of the arm to point with. |
target | Target position to point at in the global coordinate system (mm). |
Definition at line 9 of file PointingIK.cpp.
TrajectoryPtr getTrajectory | ( | ) |
Constructs a trajectory containing the sequence of joint configurations from the calls to optimize().
Neither the trajectory nor the end configuration are guaranteed to be self- collision free. Furthermore, the trajectories aren't efficient in reaching the end configuration.
getTrajectory()->size()
will equal the number of calls to optimize() plus one for the initial joint configuration
Definition at line 57 of file PointingIK.cpp.
bool isTargetReached | ( | ) |
Definition at line 42 of file PointingIK.cpp.
double optimize | ( | ) |
Optimizes the joint configuration of the internal robot model regarding pointing towards the target.
Definition at line 48 of file PointingIK.cpp.