Skip to content
Snippets Groups Projects
Commit 1a34cb37 authored by Florent Lamiraux's avatar Florent Lamiraux
Browse files

Cosmetic change

	 * include/sot-dynamic/dynamic.h,
	 * src/dynamic-command.h,
	 * src/dynamic.cpp: remove trailing white spaces.
parent de07e548
No related branches found
No related tags found
1 merge request!1[major][cpp] starting point to integrate pinocchio
...@@ -53,12 +53,12 @@ namespace djj = dynamicsJRLJapan; ...@@ -53,12 +53,12 @@ namespace djj = dynamicsJRLJapan;
/* --- API ------------------------------------------------------------- */ /* --- API ------------------------------------------------------------- */
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
#if defined (WIN32) #if defined (WIN32)
# if defined (dynamic_EXPORTS) # if defined (dynamic_EXPORTS)
# define SOTDYNAMIC_EXPORT __declspec(dllexport) # define SOTDYNAMIC_EXPORT __declspec(dllexport)
# else # else
# define SOTDYNAMIC_EXPORT __declspec(dllimport) # define SOTDYNAMIC_EXPORT __declspec(dllimport)
# endif # endif
#else #else
# define SOTDYNAMIC_EXPORT # define SOTDYNAMIC_EXPORT
#endif #endif
...@@ -82,7 +82,7 @@ namespace dg = dynamicgraph; ...@@ -82,7 +82,7 @@ namespace dg = dynamicgraph;
by the dynamicsJRLJapan library to make it accessible in the stack of tasks. by the dynamicsJRLJapan library to make it accessible in the stack of tasks.
The robot is described by a VRML file. The robot is described by a VRML file.
*/ */
class SOTDYNAMIC_EXPORT Dynamic class SOTDYNAMIC_EXPORT Dynamic
:public dg::Entity :public dg::Entity
{ {
...@@ -95,7 +95,7 @@ class SOTDYNAMIC_EXPORT Dynamic ...@@ -95,7 +95,7 @@ class SOTDYNAMIC_EXPORT Dynamic
protected: protected:
public: public:
/*! \name Fields to access dynamicsJRLJapan Library /*! \name Fields to access dynamicsJRLJapan Library
@{ @{
*/ */
...@@ -108,7 +108,7 @@ class SOTDYNAMIC_EXPORT Dynamic ...@@ -108,7 +108,7 @@ class SOTDYNAMIC_EXPORT Dynamic
int debugInertia; int debugInertia;
/*! \brief Fields to access the humanoid model /*! \brief Fields to access the humanoid model
@{ */ @{ */
/*! \brief Directory where the VRML humanoid model is stored */ /*! \brief Directory where the VRML humanoid model is stored */
...@@ -133,7 +133,7 @@ class SOTDYNAMIC_EXPORT Dynamic ...@@ -133,7 +133,7 @@ class SOTDYNAMIC_EXPORT Dynamic
virtual ~Dynamic( void ); virtual ~Dynamic( void );
public: /* --- MODEL CREATION --- */ public: /* --- MODEL CREATION --- */
virtual void buildModel( void ); virtual void buildModel( void );
void setVrmlDirectory( const std::string& filename ); void setVrmlDirectory( const std::string& filename );
...@@ -170,7 +170,7 @@ class SOTDYNAMIC_EXPORT Dynamic ...@@ -170,7 +170,7 @@ class SOTDYNAMIC_EXPORT Dynamic
bool comActivation( void ) { std::string Property("ComputeCoM"); bool comActivation( void ) { std::string Property("ComputeCoM");
std::string Value; m_HDR->getProperty(Property,Value); return (Value=="true"); } std::string Value; m_HDR->getProperty(Property,Value); return (Value=="true"); }
void comActivation( const bool& b ) { std::string Property("ComputeCoM"); void comActivation( const bool& b ) { std::string Property("ComputeCoM");
std::string Value; if (b) Value="true"; else Value="false"; m_HDR->setProperty(Property,Value); } std::string Value; if (b) Value="true"; else Value="false"; m_HDR->setProperty(Property,Value); }
public: /* --- SIGNAL --- */ public: /* --- SIGNAL --- */
...@@ -220,7 +220,7 @@ class SOTDYNAMIC_EXPORT Dynamic ...@@ -220,7 +220,7 @@ class SOTDYNAMIC_EXPORT Dynamic
ml::Matrix& computeInertia( ml::Matrix& res,int time ); ml::Matrix& computeInertia( ml::Matrix& res,int time );
ml::Matrix& computeInertiaReal( ml::Matrix& res,int time ); ml::Matrix& computeInertiaReal( ml::Matrix& res,int time );
double& computeFootHeight( double& res,int time ); double& computeFootHeight( double& res,int time );
ml::Matrix& computeGenericJacobian( CjrlJoint* j,ml::Matrix& res,int time ); ml::Matrix& computeGenericJacobian( CjrlJoint* j,ml::Matrix& res,int time );
ml::Matrix& computeGenericEndeffJacobian( CjrlJoint* j,ml::Matrix& res,int time ); ml::Matrix& computeGenericEndeffJacobian( CjrlJoint* j,ml::Matrix& res,int time );
MatrixHomogeneous& computeGenericPosition( CjrlJoint* j,MatrixHomogeneous& res,int time ); MatrixHomogeneous& computeGenericPosition( CjrlJoint* j,MatrixHomogeneous& res,int time );
...@@ -235,7 +235,7 @@ class SOTDYNAMIC_EXPORT Dynamic ...@@ -235,7 +235,7 @@ class SOTDYNAMIC_EXPORT Dynamic
virtual void commandLine( const std::string& cmdLine, virtual void commandLine( const std::string& cmdLine,
std::istringstream& cmdArgs, std::istringstream& cmdArgs,
std::ostream& os ); std::ostream& os );
public: public:
/// \name Construction of a robot by commands /// \name Construction of a robot by commands
///@{ ///@{
...@@ -248,7 +248,7 @@ class SOTDYNAMIC_EXPORT Dynamic ...@@ -248,7 +248,7 @@ class SOTDYNAMIC_EXPORT Dynamic
/// \param inJointName name of the joint, /// \param inJointName name of the joint,
/// \param inJointType type of joint in ["freeflyer","rotation","translation","anchor"], /// \param inJointType type of joint in ["freeflyer","rotation","translation","anchor"],
/// \param inPosition position of the joint (4x4 homogeneous matrix). /// \param inPosition position of the joint (4x4 homogeneous matrix).
/// ///
/// \note joints are stored in a map with names as keys for retrieval by other /// \note joints are stored in a map with names as keys for retrieval by other
/// commands. An empty CjrlBody is also created and attached to the joint. /// commands. An empty CjrlBody is also created and attached to the joint.
void createJoint(const std::string& inJointName, void createJoint(const std::string& inJointName,
......
...@@ -30,7 +30,7 @@ namespace sot { ...@@ -30,7 +30,7 @@ namespace sot {
namespace command { namespace command {
using ::dynamicgraph::command::Command; using ::dynamicgraph::command::Command;
using ::dynamicgraph::command::Value; using ::dynamicgraph::command::Value;
// Command SetFiles // Command SetFiles
class SetFiles : public Command class SetFiles : public Command
{ {
...@@ -151,7 +151,7 @@ namespace sot { ...@@ -151,7 +151,7 @@ namespace sot {
std::vector<Value> values = getParameterValues(); std::vector<Value> values = getParameterValues();
std::string property = values[0].value(); std::string property = values[0].value();
std::string value = values[1].value(); std::string value = values[1].value();
robot.m_HDR->setProperty(property, value); robot.m_HDR->setProperty(property, value);
return Value(); return Value();
} }
...@@ -447,7 +447,7 @@ namespace sot { ...@@ -447,7 +447,7 @@ namespace sot {
robot.setFootParameters(right, soleLength, soleWidth, anklePosition); robot.setFootParameters(right, soleLength, soleWidth, anklePosition);
return Value(); return Value();
} }
}; // class Setfootparameters }; // class Setfootparameters
// Command SetGazeParameters // Command SetGazeParameters
class SetGazeParameters : public Command class SetGazeParameters : public Command
......
...@@ -194,7 +194,7 @@ Dynamic( const std::string & name, bool build ) ...@@ -194,7 +194,7 @@ Dynamic( const std::string & name, bool build )
" - a string: value of the property.\n" " - a string: value of the property.\n"
" \n"; " \n";
addCommand("setProperty", new command::SetProperty(*this, docstring)); addCommand("setProperty", new command::SetProperty(*this, docstring));
docstring = " \n" docstring = " \n"
" Get a property\n" " Get a property\n"
" \n" " \n"
...@@ -1323,7 +1323,7 @@ void Dynamic::createJoint(const std::string& inJointName, ...@@ -1323,7 +1323,7 @@ void Dynamic::createJoint(const std::string& inJointName,
void Dynamic::setRootJoint(const std::string& inJointName) void Dynamic::setRootJoint(const std::string& inJointName)
{ {
if (!m_HDR) { if (!m_HDR) {
SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL, SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL,
"you must create a robot first."); "you must create a robot first.");
} }
...@@ -1338,7 +1338,7 @@ void Dynamic::setRootJoint(const std::string& inJointName) ...@@ -1338,7 +1338,7 @@ void Dynamic::setRootJoint(const std::string& inJointName)
void Dynamic::addJoint(const std::string& inParentName, void Dynamic::addJoint(const std::string& inParentName,
const std::string& inChildName) const std::string& inChildName)
{ {
if (!m_HDR) { if (!m_HDR) {
SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL, SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL,
"you must create a robot first."); "you must create a robot first.");
} }
...@@ -1359,7 +1359,7 @@ void Dynamic::setDofBounds(const std::string& inJointName, ...@@ -1359,7 +1359,7 @@ void Dynamic::setDofBounds(const std::string& inJointName,
unsigned int inDofId, unsigned int inDofId,
double inMinValue, double inMaxValue) double inMinValue, double inMaxValue)
{ {
if (!m_HDR) { if (!m_HDR) {
SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL, SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL,
"you must create a robot first."); "you must create a robot first.");
} }
...@@ -1374,7 +1374,7 @@ void Dynamic::setDofBounds(const std::string& inJointName, ...@@ -1374,7 +1374,7 @@ void Dynamic::setDofBounds(const std::string& inJointName,
void Dynamic::setMass(const std::string& inJointName, double inMass) void Dynamic::setMass(const std::string& inJointName, double inMass)
{ {
if (!m_HDR) { if (!m_HDR) {
SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL, SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL,
"you must create a robot first."); "you must create a robot first.");
} }
...@@ -1394,7 +1394,7 @@ void Dynamic::setMass(const std::string& inJointName, double inMass) ...@@ -1394,7 +1394,7 @@ void Dynamic::setMass(const std::string& inJointName, double inMass)
void Dynamic::setLocalCenterOfMass(const std::string& inJointName, void Dynamic::setLocalCenterOfMass(const std::string& inJointName,
ml::Vector inCom) ml::Vector inCom)
{ {
if (!m_HDR) { if (!m_HDR) {
SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL, SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL,
"you must create a robot first."); "you must create a robot first.");
} }
...@@ -1414,7 +1414,7 @@ void Dynamic::setLocalCenterOfMass(const std::string& inJointName, ...@@ -1414,7 +1414,7 @@ void Dynamic::setLocalCenterOfMass(const std::string& inJointName,
void Dynamic::setInertiaMatrix(const std::string& inJointName, void Dynamic::setInertiaMatrix(const std::string& inJointName,
ml::Matrix inMatrix) ml::Matrix inMatrix)
{ {
if (!m_HDR) { if (!m_HDR) {
SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL, SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL,
"you must create a robot first."); "you must create a robot first.");
} }
...@@ -1434,7 +1434,7 @@ void Dynamic::setInertiaMatrix(const std::string& inJointName, ...@@ -1434,7 +1434,7 @@ void Dynamic::setInertiaMatrix(const std::string& inJointName,
void Dynamic::setSpecificJoint(const std::string& inJointName, void Dynamic::setSpecificJoint(const std::string& inJointName,
const std::string& inJointType) const std::string& inJointType)
{ {
if (!m_HDR) { if (!m_HDR) {
SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL, SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL,
"you must create a robot first."); "you must create a robot first.");
} }
...@@ -1483,7 +1483,7 @@ void Dynamic::setHandParameters(bool inRight, const ml::Vector& inCenter, ...@@ -1483,7 +1483,7 @@ void Dynamic::setHandParameters(bool inRight, const ml::Vector& inCenter,
const ml::Vector& inForefingerAxis, const ml::Vector& inForefingerAxis,
const ml::Vector& inPalmNormal) const ml::Vector& inPalmNormal)
{ {
if (!m_HDR) { if (!m_HDR) {
SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL, SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL,
"you must create a robot first."); "you must create a robot first.");
} }
...@@ -1507,7 +1507,7 @@ void Dynamic::setFootParameters(bool inRight, const double& inSoleLength, ...@@ -1507,7 +1507,7 @@ void Dynamic::setFootParameters(bool inRight, const double& inSoleLength,
const double& inSoleWidth, const double& inSoleWidth,
const ml::Vector& inAnklePosition) const ml::Vector& inAnklePosition)
{ {
if (!m_HDR) { if (!m_HDR) {
SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL, SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL,
"you must create a robot first."); "you must create a robot first.");
} }
...@@ -1528,7 +1528,7 @@ void Dynamic::setFootParameters(bool inRight, const double& inSoleLength, ...@@ -1528,7 +1528,7 @@ void Dynamic::setFootParameters(bool inRight, const double& inSoleLength,
void Dynamic::setGazeParameters(const ml::Vector& inGazeOrigin, void Dynamic::setGazeParameters(const ml::Vector& inGazeOrigin,
const ml::Vector& inGazeDirection) const ml::Vector& inGazeDirection)
{ {
if (!m_HDR) { if (!m_HDR) {
SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL, SOT_THROW ExceptionDynamic(ExceptionDynamic::DYNAMIC_JRL,
"you must create a robot first."); "you must create a robot first.");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment