Skip to content
Snippets Groups Projects
Commit 3606f0be authored by Rohan Budhiraja's avatar Rohan Budhiraja
Browse files

[script/robot_wrapper] add momentum function. add vcom and acom to separately...

[script/robot_wrapper] add momentum function. add vcom and acom to separately compute the quantities
parent 89c617ea
Branches
Tags
No related merge requests found
......@@ -78,6 +78,22 @@ class RobotWrapper(object):
return self.data.com[0], self.data.vcom[0], self.data.acom[0]
return se3.centerOfMass(self.model, self.data, q)
def vcom(self, q, v):
se3.centerOfMass(self.model, self.data, q, v)
return self.data.vcom[0]
def acom(self, q, v, a):
se3.centerOfMass(self.model, self.data, q, v, a)
return self.data.acom[0]
def centroidalMomentum(self, q, v):
se3.ccrba(self.model, self.data, q, v)
return self.data.hg
def centroidalMomentumVariation(self, q, v, a):
se3.dccrba(self.model, self.data, q, v)
return se3.Force(self.data.Ag*a+self.data.dAg*v)
def Jcom(self, q):
return se3.jacobianCenterOfMass(self.model, self.data, q)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment