us.ihmc.scs2.definition.robot.WrenchSensorDefinition Maven / Gradle / Ivy
package us.ihmc.scs2.definition.robot;
import us.ihmc.euclid.transform.interfaces.RigidBodyTransformReadOnly;
import us.ihmc.euclid.tuple3D.interfaces.Tuple3DReadOnly;
public class WrenchSensorDefinition extends SensorDefinition
{
public enum SensorLocation
{
/**
* Hints that the sensor is located after the rigid-body and thus does not measure the dynamic
* wrench resulting from that body.
*
* For instance, a wrench sensor in the foot sole of a biped robot would typically be located after
* the foot (rigid-body it is attached to). As such, the sensor does not read the weight of the foot
* when in swing.
*
*/
AFTER_BODY,
/**
* Hints that the sensor is located before the rigid-body and thus measures the dynamic wrench
* resulting from that body.
*/
BEFORE_BODY;
};
/**
* Indicates the location of the sensor with respect to the rigid-body it is attached to.
*
* This is currently used as a hint to the simulated sensor to indicate whether to sense the dynamic
* wrench generated by the rigid-body it is attached to.
*
*
* While the sensor is added to a joint, it is considered to be physically attached to the successor
* joint, which is the rigid-body that is referenced to in this documentation.
*
*/
private SensorLocation location = SensorLocation.AFTER_BODY;
public WrenchSensorDefinition()
{
}
public WrenchSensorDefinition(String name)
{
super(name);
}
public WrenchSensorDefinition(String name, Tuple3DReadOnly offsetFromJoint)
{
super(name, offsetFromJoint);
}
public WrenchSensorDefinition(String name, RigidBodyTransformReadOnly transformToJoint)
{
super(name, transformToJoint);
}
public WrenchSensorDefinition(WrenchSensorDefinition other)
{
super(other);
}
public void setLocation(SensorLocation location)
{
this.location = location;
}
public SensorLocation getLocation()
{
return location;
}
@Override
public SensorDefinition copy()
{
return new WrenchSensorDefinition(this);
}
}