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

Class CustomFunction

tests/python/test_custom_python_classes.py:8–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7
8class CustomFunction(aligator.StageFunction):
9 def __init__(self, space: aligator.manifolds.ManifoldAbstract, nu):
10 self.space = space
11 ndx = space.ndx
12 super().__init__(ndx, nu, ndx)
13
14 def __getinitargs__(self):
15 return (self.space, self.nu)
16
17 def evaluate(self, x, u, data: aligator.StageFunctionData):
18 data.value[:] = self.space.difference(x, self.space.neutral())
19
20 def computeJacobians(self, x, u, data: aligator.StageFunctionData):
21 data.Jx[:] = self.space.Jdifference(x, self.space.neutral(), 0)
22
23
24class TwistModelExplicit(aligator.dynamics.ExplicitDynamicsModel):

Callers 1

test_custom_controlboxFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_custom_controlboxFunction · 0.68