Commit 90791b26 authored by Nicolas Mansard's avatar Nicolas Mansard Committed by Nicolas Mansard
Browse files

Added NeutralConfig.

parent af5fb127
......@@ -215,7 +215,7 @@ namespace hpp {
virtual bool currentConfiguration (ConfigurationIn_t configuration);
/// Get the neutral configuration
Configuration_t neutralConfiguration () const;
const Configuration_t & neutralConfiguration () const;
/// Get current velocity
const vector_t& currentVelocity () const
......
......@@ -111,8 +111,8 @@ namespace hpp {
//DEPREC /// Compute jacobian matrix of joint and all its descendents.
//DEPREC void computeJacobian ();
/// Get neutral configuration of joint
//NOTYET vector_t neutralConfiguration () const;
//DEPREC /// Get neutral configuration of joint
//DEPREC vector_t neutralConfiguration () const;
///\}
// -----------------------------------------------------------------------
......
......@@ -199,6 +199,10 @@ namespace hpp {
return false;
}
const Configuration_t & Device::
neutralConfiguration () const
{ return model()->neutralConfiguration; }
const value_type& Device::
mass () const
{
......
......@@ -57,7 +57,7 @@ static bool verbose = false;
//NOTCHECKED virtual void setDimensionExtraConfigSpace (const size_type& dimension)
// const Configuration_t& currentConfiguration () const
// virtual bool currentConfiguration (ConfigurationIn_t configuration);
//NOTCHECKED Configuration_t neutralConfiguration () const;
// Configuration_t neutralConfiguration () const;
// const vector_t& currentVelocity () const
// void currentVelocity (vectorIn_t velocity)
// const vector_t& currentAcceleration () const
......@@ -146,6 +146,11 @@ BOOST_AUTO_TEST_CASE (easyGetter)
q = qcopy;
pinocchio->currentConfiguration(q);
BOOST_CHECK( pinocchio->currentConfiguration() == qcopy );
std::cout << pinocchio->neutralConfiguration().transpose() << std::endl;
std::cout << model->neutralConfiguration().transpose() << std::endl;
BOOST_CHECK( pinocchio->neutralConfiguration().isApprox( model->neutralConfiguration() ) );
}
/* --- Check vel acc */
......
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