test_Gravity.py
Go to the documentation of this file.
1 import os
2 
3 import numpy as np
4 import pinocchio as se3
5 import tsid
6 
7 print("")
8 print("Test setGravity")
9 print("")
10 
11 
12 filename = str(os.path.dirname(os.path.abspath(__file__)))
13 path = filename + "/../../models/romeo"
14 urdf = path + "/urdf/romeo.urdf"
15 vector = se3.StdVec_StdString()
16 vector.extend(item for item in path)
17 
18 robot = tsid.RobotWrapper(urdf, vector, se3.JointModelFreeFlyer(), False)
19 
20 init_gravity = robot.model().gravity.copy()
21 
22 robot.setGravity(se3.Motion.Zero())
23 
24 no_gravity = robot.model().gravity.copy()
25 
26 print(init_gravity)
27 print(no_gravity)
28 
29 assert init_gravity != no_gravity
30 
31 print("All test is done")


tsid
Author(s): Andrea Del Prete, Justin Carpentier
autogenerated on Sun Jul 2 2023 02:21:51