Commit 1173a879 authored by Rohan Budhiraja's avatar Rohan Budhiraja
Browse files

[algorithm/centroidal] computeCentroidalMomentum calculates vcom as well

parent 17c479e2
Pipeline #11643 passed with stage
in 202 minutes and 22 seconds
......@@ -51,6 +51,8 @@ namespace pinocchio
data.hg = data.h[0];
data.hg.angular() += data.hg.linear().cross(data.com[0]);
data.vcom[0].noalias() = data.hg.linear()/data.mass[0];
return data.hg;
}
......@@ -93,6 +95,7 @@ namespace pinocchio
}
data.com[0] /= data.mass[0];
data.hg = data.h[0];
data.hg.angular() += data.hg.linear().cross(data.com[0]);
......@@ -100,6 +103,8 @@ namespace pinocchio
data.dhg = data.f[0];
data.dhg.angular() += data.dhg.linear().cross(data.com[0]);
data.vcom[0].noalias() = data.hg.linear()/data.mass[0];
return data.dhg;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment