forcedimension_core.dhd.direct module
- forcedimension_core.dhd.direct.getAngularVelocityDeg(out: SupportsPtrs3[c_double], ID: int = -1) int[source]
Retrieve the estimated angular velocity (in [deg/s]).
Note
The velocity estimator requires at least 2 position updates during the time interval defined in
forcedimension_core.dhd.configAngularVelocity()in order to be able to compute the estimate. Otherwise, if there are no calls to:func:forcedimension_core.dhd.getPosition() orforcedimension_core.dhd.getAngularVelocityDeg(), this function will error withforcedimension_core.constants.ErrorNum.TIMEOUT. For more information refer to Velocity Estimator.- Parameters:
ID (int) – Device ID (see Support for Multiple Devices section for details).
out – An output buffer to store the angular velocity (in [deg/s]).
- Raises:
AttributeError – If
out.ptrsis not a valid attribute ofoutTypeError – If
out.ptrsis not iterable.ctypes.ArgumentError – If
out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.ctypes.ArgumentError – If
IDis not implicitly convertible to C char.
- Returns:
0 on success, -1 otherwise.
See also
forcedimension_core.dhd.direct.configAngularVelocity()
- forcedimension_core.dhd.direct.getAngularVelocityRad(out: SupportsPtrs3[c_double], ID: int = -1) int[source]
Retrieve the estimated angular velocity (in [rad/s]).
Note
The velocity estimator requires at least 2 position updates during the time interval defined in
forcedimension_core.dhd.configAngularVelocity()in order to be able to compute the estimate. Otherwise, if there are no calls to:func:forcedimension_core.dhd.getPosition() orforcedimension_core.dhd.getAngularVelocityRad(), this function will return error withforcedimension_core.constants.ErrorNum.TIMEOUT. For more information refer to Velocity Estimator.- Parameters:
ID (int) – Device ID (see Support for Multiple Devices section for details).
out – An output buffer to store the angular velocity (in [rad/s]).
- Raises:
AttributeError – If
out.ptrsis not a valid attribute ofoutTypeError – If
out.ptrsis not iterable.ctypes.ArgumentError – If
out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.ctypes.ArgumentError – If
IDis not implicitly convertible to C char.
- Returns:
0 on success, -1 otherwise.
See also
forcedimension_core.dhd.direct.configAngularVelocity()
- forcedimension_core.dhd.direct.getForce(out: SupportsPtrs3[c_double], ID: int = -1) int[source]
Retrieve the force vector applied to the end-effector (in [N]) about the X, Y, and Z axes Please refer to your device user manual for more information on your device coordinate system.
- Parameters:
out (SupportsPtrs3[ctypes.c_double]) – An output buffer to store the applied forces on the end-effector (in [N]).
ID (int) – Device ID (see Support for Multiple Devices section for details).
- Raises:
AttributeError – If
out.ptrsis not a valid attribute ofoutTypeError – If
outdoes not support item assignment either because its immutable or not subscriptable.TypeError – If
out.ptrsis not iterable.ctypes.ArgumentError – If
out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.ctypes.ArgumentError – If
IDis not implicitly convertible to C char.
- Returns:
0 on success, -1 otherwise.
See also
forcedimension_core.dhd.direct.setForce()forcedimension_core.dhd.direct.setForceAndTorque()forcedimension_core.dhd.direct.setForceAndTorqueAndGripperForce()
- forcedimension_core.dhd.direct.getForceAndTorque(f_out: SupportsPtrs3[c_double], t_out: SupportsPtrs3[c_double], ID: int = -1) int[source]
Retrieve the forces (in [N]) and torques (in [Nm]) applied to the device end-effector about the X, Y, and Z axes. Please refer to your device user manual for more information on your device coordinate system.
- Parameters:
ID (int) – Device ID (see Support for Multiple Devices section for details).
f_out (SupportsPtrs3[ctypes.c_double]) – An output buffer to store the applied forces on the end-effector (in [N]).
t_out (SupportsPtrs3[ctypes.c_double]) – An output buffer to store the applied torques on the end-effector (in [Nm]).
- Raises:
AttributeError – If
f_out.ptrsis not a valid attribute off_outTypeError – If
f_out.ptrsis not iterable.ctypes.ArgumentError – If
f_out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.AttributeError – If
t_out.ptrsis not a valid attribute oft_outTypeError – If
t_out.ptrsis not iterable.ctypes.ArgumentError – If
t_out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.ctypes.ArgumentError – If
IDis not implicitly convertible to C char.
- Returns:
0, on success, -1 otherwise.
See also
forcedimension_core.dhd.direct.setForce()forcedimension_core.dhd.direct.setForceAndTorque()forcedimension_core.dhd.direct.setForceAndTorqueAndGripperForce()
- forcedimension_core.dhd.direct.getForceAndTorqueAndGripperForce(f_out: SupportsPtrs3[c_double], t_out: SupportsPtrs3[c_double], fg_out: c_double, ID: int = -1) int[source]
Retrieve the forces (in [N]) and torques (in [Nm]) applied to the device end-effector as well as the gripper force (in [N]). Forces and torques are about the X, Y, and Z axes.
- Parameters:
ID (int) – Device ID (see Support for Multiple Devices section for details).
f_out (SupportsPtrs3[ctypes.c_double]) – An output buffer to store the applied forces on the end-effector (in [N]).
t_out (SupportsPtrs3[ctypes.c_double]) – An output buffer to store the applied torques on the end-effector (in [Nm]).
- Raises:
AttributeError – If
f_out.ptrsis not a valid attribute off_outTypeError – If
f_out.ptrsis not iterable.ctypes.ArgumentError – If
f_out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.AttributeError – If
t_out.ptrsis not a valid attribute oft_outTypeError – If
t_out.ptrsis not iterable.ctypes.ArgumentError – If
t_out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.AttributeError – If
fg_out.ptris not a valid attribute offg_outctypes.ArgumentError – If
fg_out.ptris not aPointer[c_double].ctypes.ArgumentError – If
IDis not implicitly convertible to C char.
- Returns:
0, on success, -1 otherwise.
- forcedimension_core.dhd.direct.getGripperFingerPos(out: SupportsPtrs3[c_double], ID: int = -1) int[source]
Read the position (in [m]) of forefinger rest location about the X, Y, and Z axes of the force gripper structure if present.
Note
This feature only applies to devices with a gripper. See the Device Types section for more details.
- Parameters:
ID (int) – Device ID (see Support for Multiple Devices section for details).
out (SupportsPtrs3[ctypes.c_double]) – An output buffer to store the gripper finger position (in [m]).
- Raises:
AttributeError – If
out.ptrsis not a valid attribute ofoutTypeError – If
out.ptrsis not iterable.ctypes.ArgumentError – If
out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.ctypes.ArgumentError – If
IDis not implicitly convertible to C char.
- Returns:
0 or
forcedimension_core.constants.TIMEGUARDon success, -1 otherwise.
- forcedimension_core.dhd.direct.getGripperThumbPos(out: SupportsPtrs3[c_double], ID: int = -1) int[source]
Read the position (in [m]) of thumb rest location about the X, Y, and Z axes of the force gripper structure if present.
Note
This feature only applies to devices with a gripper. See the Device Types section for more details.
- Parameters:
ID (int) – Device ID (see Support for Multiple Devices section for details).
out (SupportsPtrs3[ctypes.c_double]) – An output buffer to store the grippper thumb position (in [m]).
- Raises:
AttributeError – If
out.ptrsis not a valid attribute ofoutTypeError – If
out.ptrsis not iterable.ctypes.ArgumentError – If
out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.ctypes.ArgumentError – If
IDis not implicitly convertible to C char.
- Returns:
0 or
forcedimension_core.constants.TIMEGUARDon success, -1 otherwise.
- forcedimension_core.dhd.direct.getLinearVelocity(out: SupportsPtrs3[c_double], ID: int = -1) int[source]
Retrieve the estimated instanteous linear velocity (in [m/s]).
Note
The velocity estimator requires at least 2 position updates during the time interval defined in
forcedimension_core.dhd.configLinearVelocity()in order to be able to compute the estimate. Otherwise, if there are no calls toforcedimension_core.dhd.getPosition()orforcedimension_core.dhd.getLinearVelocity(), this function will error withforcedimension_core.constants.ErrorNum.TIMEOUT. For more information refer to Velocity Estimator.- Parameters:
ID (int) – Device ID (see Support for Multiple Devices section for details).
out (SupportsPtr[ctypes.c_double]) – An output buffer to store the linear velocity (in [m/s]).
- Raises:
AttributeError – If
out.ptrsis not a valid attribute ofoutTypeError – If
out.ptrsis not iterable.ctypes.ArgumentError – If
out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.ctypes.ArgumentError – If
IDis not implicitly convertible to C char.
- Returns:
0 on success, -1 otherwise.
See also
forcedimension_core.dhd.direct.configLinearVelocity()
- forcedimension_core.dhd.direct.getOrientationDeg(out: SupportsPtrs3[c_double], ID: int = -1) int[source]
For devices with a wrist structure, retrieve individual angle (in [deg]) of each joint, starting with the one located nearest to the wrist base plate.
Note
This feature only applies to devices with a wrist. See the Device Types section for more details.
Note
forcedimension_core.constants.DeviceType.OMEGA6_RIGHTandforcedimension_core.constants.DeviceType.OMEGA6_LEFThave angles that are instead computed with respect to their internal reference frame, which is rotated π/4 radians around the Y axis. Please refer to your device user manual for more information on your device coordinate system.- Parameters:
out (SupportsPtrs3[ctypes.c_double]) – An output buffer to store the joint angles (in [deg]).
ID (int) – Device ID (see Support for Multiple Devices section for details).
- Raises:
AttributeError – If
out.ptrsis not a valid attribute ofoutTypeError – If
outdoes not support item assignment either because its immutable or not subscriptable.TypeError – If
out.ptrsis not iterable.ctypes.ArgumentError – If
out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.ctypes.ArgumentError – If
IDis not implicitly convertible to C char.
- Returns:
0 or
forcedimension_core.constants.TIMEGUARDon success, -1 otherwise.
- forcedimension_core.dhd.direct.getOrientationFrame(out: SupportsPtr[c_double], ID: int = -1) int[source]
Retrieve the rotation matrix of the wrist structure. The identity matrix is returned for devices that do not support orientations.
- Parameters:
ID (int) – Device ID (see Support for Multiple Devices section for details).
out (SupportsPtr[ctypes.c_double]) – An output buffer to store the orientation frame.
- Raises:
ctypes.ArgumentError – If
IDis not implicitly convertible to C char.AttributeError – If
out.ptris not a valid attribute ofp_outctypes.ArgumentError – If
out.ptris not aPointer[c_double]type.
- Returns:
0 or
forcedimension_core.constants.TIMEGUARDon success, -1 otherwise.
- forcedimension_core.dhd.direct.getOrientationRad(out: SupportsPtrs3[c_double], ID: int = -1) int[source]
For devices with a wrist structure, retrieve individual angle (in [rad]) of each joint, starting with the one located nearest to the wrist base plate.
Note
This feature only applies to devices with a wrist. See the Device Types section for more details.
Note
forcedimension_core.constants.DeviceType.OMEGA6_RIGHTandforcedimension_core.constants.DeviceType.OMEGA6_LEFThave angles that are instead computed with respect to their internal reference frame, which is rotated π/4 radians around the Y axis. Please refer to your device user manual for more information on your device coordinate system.- Parameters:
out (SupportsPtrs3[ctypes.c_double]) – An output buffer to store the joint angles (in [rad]).
ID (int) – Device ID (see Support for Multiple Devices section for details).
- Raises:
AttributeError – If
out.ptrsis not a valid attribute ofoutTypeError – If
outdoes not support item assignment either because its immutable or not subscriptable.TypeError – If
out.ptrsis not iterable.ctypes.ArgumentError – If
out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.ctypes.ArgumentError – If
IDis not implicitly convertible to C char.
- Returns:
0 or
forcedimension_core.constants.TIMEGUARDon success, -1 otherwise.
- forcedimension_core.dhd.direct.getPosition(out: SupportsPtrs3[c_double], ID: int = -1) int[source]
Retrieve the position of the end-effector about the X, Y, and Z axes. Please refer to your device user manual for more information on your device coordinate system.
- Parameters:
out (SupportsPtrs3[ctypes.c_double]) – An output buffer to store the position of the end-effector (in [m]).
ID (int) – Device ID (see Support for Multiple Devices section for details).
- Raises:
AttributeError – If
out.ptrsis not a valid attribute ofoutTypeError – If
out.ptrsis not iterable.ctypes.ArgumentError – If
out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.ctypes.ArgumentError – If
IDis not implicitly convertible to C char.
- Returns:
0 or
forcedimension_core.dhd.TIMEGUARDon success, -1 otherwise.
- forcedimension_core.dhd.direct.getPositionAndOrientationDeg(p_out: SupportsPtrs3[c_double], o_out: SupportsPtrs3[c_double], ID: int = -1) int[source]
Retrieve the position (in [m]) and for devices with a wrist structure, retrieve individual angle of each joint (in [deg]), starting with the one located nearest to the wrist base plate.
Note
This feature only applies to devices with a wrist. See the Device Types section for more details.
Note
forcedimension_core.constants.DeviceType.OMEGA6_RIGHTandforcedimension_core.constants.DeviceType.OMEGA6_LEFThave angles that are instead computed with respect to their internal reference frame, which is rotated π/4 radians around the Y axis. Please refer to your device user manual for more information on your device coordinate system.- Parameters:
ID (int) – Device ID (see Support for Multiple Devices section for details).
p_out (SupportsPtrs3[ctypes.c_double]) – An output buffer to store the position (in [m]).
o_out (SupportsPtrs3[ctypes.c_double]) – An output buffer to store the joint angles (in [rad]).
- Raises:
AttributeError – If
p_out.ptrsis not a valid attribute ofoutTypeError – If
p_out.ptrsis not iterable.ctypes.ArgumentError – If
p_out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.AttributeError – If
o_out.ptrsis not a valid attribute ofoutTypeError – If
o_outdoes not support item assignment either because its immutable or not subscriptable.TypeError – If
o_out.ptrsis not iterable.ctypes.ArgumentError – If
o_out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.ctypes.ArgumentError – If
IDis not implicitly convertible to C char.
- Returns:
0 or
forcedimension_core.constants.TIMEGUARDon success, -1 otherwise.
- forcedimension_core.dhd.direct.getPositionAndOrientationFrame(p_out: SupportsPtrs3[c_double], matrix_out: SupportsPtr[c_double], ID: int = -1) int[source]
Retrieve the position (in [m]) and orientation matrix of the end-effector about the X, Y, and Z axes. Please refer to your device user manual for more information on your device coordinate system.
Note
This feature only applies to devices with a wrist. See the Device Types section for more details.
Note
forcedimension_core.constants.DeviceType.OMEGA6_RIGHTandforcedimension_core.constants.DeviceType.OMEGA6_LEFThave angles that are instead computed with respect to their internal reference frame, which is rotated π/4 radians around the Y axis. Please refer to your device user manual for more information on your device coordinate system.- Parameters:
ID (int) – Device ID (see Support for Multiple Devices section for details).
- Raises:
AttributeError – If
p_out.ptrsis not a valid attribute ofp_outTypeError – If
p_out.ptrsis not iterable.ctypes.ArgumentError – If
p_out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.AttributeError – If
matrix_out.ptris not a valid attribute ofmatrix_out.ctypes.ArgumentError – If
p_out.ptris not aPointer[c_double]type.ctypes.ArgumentError – If
IDis not implicitly convertible to C char.
- Returns:
0 or
forcedimension_core.constants.TIMEGUARDon success, -1 otherwise.
See also
- forcedimension_core.dhd.direct.getPositionAndOrientationRad(p_out: SupportsPtrs3[c_double], o_out: SupportsPtrs3[c_double], ID: int = -1) int[source]
Retrieve the position (in [m]) and for devices with a wrist structure, retrieve individual angle of each joint (in [rad]), starting with the one located nearest to the wrist base plate.
Note
This feature only applies to devices with a wrist. See the Device Types section for more details.
Note
forcedimension_core.constants.DeviceType.OMEGA6_RIGHTandforcedimension_core.constants.DeviceType.OMEGA6_LEFThave angles that are instead computed with respect to their internal reference frame, which is rotated π/4 radians around the Y axis. Please refer to your device user manual for more information on your device coordinate system.- Parameters:
ID (int) – Device ID (see Support for Multiple Devices section for details).
p_out (SupportsPtrs3[ctypes.c_double]) – An output buffer to store the position (in [m]).
o_out (SupportsPtrs3[ctypes.c_double]) – An output buffer to store the joint angles (in [rad]).
- Raises:
AttributeError – If
p_out.ptrsis not a valid attribute ofoutTypeError – If
p_out.ptrsis not iterable.ctypes.ArgumentError – If
p_out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.AttributeError – If
o_out.ptrsis not a valid attribute ofoutTypeError – If
o_outdoes not support item assignment either because its immutable or not subscriptable.TypeError – If
o_out.ptrsis not iterable.ctypes.ArgumentError – If
o_out.ptrsdoes not expand into a tuple of 3Pointer[c_double]types.ctypes.ArgumentError – If
IDis not implicitly convertible to C char.
- Returns:
0 or
forcedimension_core.constants.TIMEGUARDon success, -1 otherwise.
See also
forcedimension_core.dhd.direct.getOrientationDeeg()