Commit 5a050a1a authored by Alexis Nicolin's avatar Alexis Nicolin
Browse files

Added createAcceleration command

parent 1604125f
...@@ -254,6 +254,7 @@ class SOTDYNAMIC_EXPORT DynamicPinocchio ...@@ -254,6 +254,7 @@ class SOTDYNAMIC_EXPORT DynamicPinocchio
void cmd_createJacobianEndEffectorSignal( const std::string& sig,const std::string& j ); void cmd_createJacobianEndEffectorSignal( const std::string& sig,const std::string& j );
void cmd_createPositionSignal ( const std::string& sig,const std::string& j ); void cmd_createPositionSignal ( const std::string& sig,const std::string& j );
void cmd_createVelocitySignal ( const std::string& sig,const std::string& j ); void cmd_createVelocitySignal ( const std::string& sig,const std::string& j );
void cmd_createAccelerationSignal ( const std::string& sig,const std::string& j );
private: private:
/// \brief map of joints in construction. /// \brief map of joints in construction.
......
...@@ -215,6 +215,12 @@ DynamicPinocchio( const std::string & name) ...@@ -215,6 +215,12 @@ DynamicPinocchio( const std::string & name)
"string (signal name)","string (joint name)"); "string (signal name)","string (joint name)");
addCommand("createVelocity", addCommand("createVelocity",
makeCommandVoid2(*this,&DynamicPinocchio::cmd_createVelocitySignal,docstring)); makeCommandVoid2(*this,&DynamicPinocchio::cmd_createVelocitySignal,docstring));
docstring = docCommandVoid2("Create an acceleration (vector) signal only for one joint.",
"string (signal name)","string (joint name)");
addCommand("createAcceleration",
makeCommandVoid2(*this,&DynamicPinocchio::cmd_createAccelerationSignal,docstring));
} }
...@@ -564,7 +570,7 @@ createAccelerationSignal( const std::string& signame, const std::string& jointNa ...@@ -564,7 +570,7 @@ createAccelerationSignal( const std::string& signame, const std::string& jointNa
= new dg::SignalTimeDependent< dg::Vector,int > = new dg::SignalTimeDependent< dg::Vector,int >
( boost::bind(&DynamicPinocchio::computeGenericAcceleration,this,jointId,_1,_2), ( boost::bind(&DynamicPinocchio::computeGenericAcceleration,this,jointId,_1,_2),
forwardKinematicsSINTERN, forwardKinematicsSINTERN,
"sotDynamicPinocchio("+name+")::output(matrixHomo)::"+signame ); "sotDynamicPinocchio("+name+")::output(dg::Vector)::"+signame );
genericSignalRefs.push_back( sig ); genericSignalRefs.push_back( sig );
signalRegistration( *sig ); signalRegistration( *sig );
...@@ -1182,3 +1188,8 @@ void DynamicPinocchio::cmd_createVelocitySignal( const std::string& signalName, ...@@ -1182,3 +1188,8 @@ void DynamicPinocchio::cmd_createVelocitySignal( const std::string& signalName,
{ {
createVelocitySignal(signalName, jointName); createVelocitySignal(signalName, jointName);
} }
void DynamicPinocchio::cmd_createAccelerationSignal( const std::string& signalName,
const std::string& jointName )
{
createAccelerationSignal(signalName, jointName);
}
Markdown is supported
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