def test_all_sampled_models(self):

        huamnoid_1 = pin.buildSampleModelHumanoidRandom()
        huamnoid_2 = pin.buildSampleModelHumanoidRandom(True)
        huamnoid_3 = pin.buildSampleModelHumanoidRandom(False)

        self.assertTrue(huamnoid_1 != huamnoid_2)
        self.assertTrue(huamnoid_1 != huamnoid_3)

        manipulator_1 = pin.buildSampleModelManipulator()

        if pin.WITH_HPP_FCL:
            geometry_manipulator_1 = pin.buildSampleGeometryModelManipulator(
                manipulator_1)

        humanoid_4 = pin.buildSampleModelHumanoid()
        humanoid_5 = pin.buildSampleModelHumanoid(True)
        humanoid_6 = pin.buildSampleModelHumanoid(False)

        self.assertTrue(humanoid_4 == humanoid_5)
        self.assertTrue(humanoid_4 != humanoid_6)

        if pin.WITH_HPP_FCL:
            geometry_humanoid_2 = pin.buildSampleGeometryModelHumanoid(
                humanoid_4)
Example #2
0
 def setUp(self):
     self.model = pin.buildSampleModelHumanoid()
     self.collision_model = pin.buildSampleGeometryModelHumanoid(self.model)
# GepettoVisualizer: -g
# MeshcatVisualizer: -m
VISUALIZER = None
if len(argv) > 1:
    opt = argv[1]
    if opt == '-g':
        VISUALIZER = GepettoVisualizer
    elif opt == '-m':
        VISUALIZER = MeshcatVisualizer
    elif opt == '-r':
        VISUALIZER = RVizVisualizer
    else:
        raise ValueError("Unrecognized option: " + opt)

model = pin.buildSampleModelHumanoid()
visual_model = pin.buildSampleGeometryModelHumanoid(model)
collision_model = visual_model.copy()

q0 = pin.neutral(model)

if VISUALIZER:
    viz = VISUALIZER(model, collision_model, visual_model)
    viz.initViewer()
    viz.loadViewerModel()
    viz.display(q0)

    input("Enter to check a new configuration")

    q = q0.copy()
    q[8] = pi / 2
    q[14] = pi / 2
 def setUp(self):
     model = pin.buildSampleModelHumanoid()
     self.collision_model = pin.buildSampleGeometryModelHumanoid(model)
Example #5
0
 def setUp(self):
     model = se3.buildSampleModelHumanoid()
     self.collision_model = se3.buildSampleGeometryModelHumanoid(model)