1 from pathlib
import Path
4 import pinocchio
as se3
9 print(
"Test Measured6dWrench")
14 filename = str(Path(__file__).resolve().parent)
15 path = filename +
"/../../models/romeo"
16 urdf = path +
"/urdf/romeo.urdf"
17 vector = se3.StdVec_StdString()
18 vector.extend(item
for item
in path)
19 robot = tsid.RobotWrapper(urdf, vector, se3.JointModelFreeFlyer(),
False)
22 frameName =
"RAnkleRoll"
23 contact = tsid.Measured6dWrench(
"Measured6dwrench", robot, frameName)
24 wrench = np.asarray([1.5, 1.5, 1.5, 2.5, 2.5, 2.5])
25 contact.setMeasuredContactForce(wrench)
26 measured_wrench = contact.measuredContactForce
27 print(measured_wrench)
30 invdyn.addMeasuredForce(contact)