3 import pinocchio
as pin
5 from test_case
import PinocchioTestCase
as TestCase
7 main_path =
"./serialization-data" 12 model = pin.buildSampleModelHumanoidRandom()
13 filename = main_path +
"/model.txt" 14 model.saveToText(filename)
17 model2.loadFromText(filename)
19 self.assertTrue(model == model2)
22 model = pin.buildSampleModelHumanoidRandom()
23 filename = main_path +
"/model.xml" 25 model.saveToXML(filename,tag_name)
28 model2.loadFromXML(filename,tag_name)
30 self.assertTrue(model == model2)
33 model = pin.buildSampleModelHumanoidRandom()
34 filename = main_path +
"/model.bin" 35 model.saveToBinary(filename)
38 model2.loadFromBinary(filename)
40 self.assertTrue(model == model2)
42 if __name__ ==
'__main__':