MCPcopy Create free account
hub / github.com/Simple-Robotics/Simple / test_manipulator_limits

Function test_manipulator_limits

tests/python/test_simulator_instance.py:291–304  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

289
290
291def test_manipulator_limits():
292 model = pin.buildSampleModelManipulator()
293 geom_model = pin.buildSampleGeometryModelManipulator(model)
294 q0 = pin.neutral(model)
295 model.lowerPositionLimit = q0.copy()
296 model.upperPositionLimit = q0.copy()
297 sim = simple.Simulator(model, geom_model)
298 v = np.zeros(model.nv)
299 tau = np.zeros(model.nv)
300 dt = 1e-3
301 sim.step(q0, v, tau, dt)
302 assert sim.constraints_problem.getNumberOfContacts() == 0
303 assert sim.constraints_problem.constraints_problem_size() == 2 * model.nq
304 assert np.linalg.norm(sim.vnew) < 1e-6
305
306
307def test_humanoid_limits():

Callers

nothing calls this directly

Calls 2

getNumberOfContactsMethod · 0.80

Tested by

no test coverage detected