raisim::GripperState
struct · #include <raisim/object/ArticulatedSystem/Gripper.hpp>
What a gripper did in the last step (ArticulatedSystem::getGripperState()).
Public attributes
engaged
bool engagedTrue if the gripper pulled an object, or the link toward a static object, in the last step.
object
const Object *objectThe object it held, or nullptr. When the samples of a pad grid pull several bodies, the body that took the largest total pull. Removing an object from the world drops the samples that held it; with none left, this becomes nullptr.
localIdx
size_t localIdxLocal index of the body of the object it held.
force
double forceThe pull [N]; the sum over the samples of a pad grid.
gap
double gapThe distance between the pad and the object's surface [m]; zero when they touch. For a pad grid, the smallest gap of the samples that pulled.
position
Vec<3> positionWhere the pull acted on the object, in the world frame [m]. For a pad grid, the mean of the points where its samples pulled, weighted by their pulls.
engagedSamples
size_t engagedSamplesThe number of samples that pulled: 0 or 1 for a point, up to padSamples[0] * padSamples[1] for a pad grid.