Commit 36a80193 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Add method Device::neutralConfiguration

parent 758640d7
......@@ -173,6 +173,9 @@ namespace hpp {
currentConfiguration_ = configuration;
}
}
/// Get the neutral configuration
Configuration_t neutralConfiguration () const;
/// Get current velocity
const vector_t& currentVelocity () const
{
......
......@@ -529,6 +529,17 @@ namespace hpp {
}
}
Configuration_t Device::neutralConfiguration () const
{
Configuration_t nc (configSize());
const JointVector_t& jv = getJointVector ();
for (JointVector_t::const_iterator it = jv.begin ();
it != jv.end (); it++)
nc.segment ((*it)->rankInConfiguration (), (*it)->configSize()) =
(*it)->neutralConfiguration ();
return nc;
}
void Device::resizeJacobians ()
{
jacobianCom_.resize (3, numberDof_);
......
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