3 from pathlib
import Path
6 import pinocchio
as pin
7 from test_case
import PinocchioTestCase
as TestCase
15 map = pin.StdMap_String_VectorXd()
18 key_name =
"key_" + str(k + 1)
20 map[key_name] = np.random.rand(10)
22 pickle.dump(map, Path(
"save_std_map.p").
open(
"wb"))
24 map_loaded = pickle.load(Path(
"save_std_map.p").
open(
"rb"))
26 self.assertApprox(map[key], map_loaded[key])
29 if __name__ ==
"__main__":