Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 8, 2024
1 parent a4d6494 commit e8e7194
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 50 deletions.
3 changes: 1 addition & 2 deletions include/sot/core/sot.hh
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ class SOTSOT_CORE_EXPORT Sot : public Entity {
public:
/*! \brief Default constructor */
Sot(const std::string &name);
~Sot(void) { /* TODO!! */
}
~Sot(void) { /* TODO!! */ }

/*! \name Methods to handle the stack.
@{
Expand Down
8 changes: 3 additions & 5 deletions src/exception/exception-factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,15 @@ ExceptionFactory::ExceptionFactory(
char buffer[SIZE];
vsnprintf(buffer, SIZE, format, args);

sotDEBUG(15) << "Created "
<< " with message <" << msg << "> and buffer <" << buffer
<< ">. " << std::endl;
sotDEBUG(15) << "Created " << " with message <" << msg << "> and buffer <"
<< buffer << ">. " << std::endl;

message += buffer;

va_end(args);

sotDEBUG(1) << "Throw exception " << EXCEPTION_NAME << "[#" << errcode
<< "]: "
<< "<" << message << ">." << std::endl;
<< "]: " << "<" << message << ">." << std::endl;
}

/*
Expand Down
14 changes: 7 additions & 7 deletions src/filters/filter-differentiator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,19 @@ void FilterDifferentiator::init(const double &timestep, const size_type &xSize,
m_filter =
new CausalFilter(timestep, xSize, filter_numerator, filter_denominator);

LOG("Filtering started with "
<< "Numerator " << filter_numerator << std::endl
<< "Denominator" << filter_denominator << std::endl);
LOG("Filtering started with " << "Numerator " << filter_numerator << std::endl
<< "Denominator" << filter_denominator
<< std::endl);
return;
}

void FilterDifferentiator::switch_filter(
const Eigen::VectorXd &filter_numerator,
const Eigen::VectorXd &filter_denominator) {
LOG("Filter switched with "
<< "Numerator " << filter_numerator << std::endl
<< "Denominator" << filter_denominator << std::endl
<< "at time" << m_xSIN.getTime());
LOG("Filter switched with " << "Numerator " << filter_numerator << std::endl
<< "Denominator" << filter_denominator
<< std::endl
<< "at time" << m_xSIN.getTime());
m_filter->switch_filter(filter_numerator, filter_denominator);
}

Expand Down
3 changes: 1 addition & 2 deletions src/task/task-conti.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ VectorMultiBound &TaskConti::computeContiDesiredVelocity(
/* --- DISPLAY ------------------------------------------------------------ */

void TaskConti::display(std::ostream &os) const {
os << "TaskConti " << name << " [t=" << timeRef << "] "
<< ": " << endl;
os << "TaskConti " << name << " [t=" << timeRef << "] " << ": " << endl;
os << "--- LIST --- " << std::endl;

for (FeatureList_t::const_iterator iter = featureList.begin();
Expand Down
7 changes: 3 additions & 4 deletions src/tools/robot-utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,9 @@ void ForceUtil::display(std::ostream &os) const {
os << std::endl;

os << "Index for force sensors:" << std::endl;
os << "Left Hand (" << m_Force_Id_Left_Hand << ") ,"
<< "Right Hand (" << m_Force_Id_Right_Hand << ") ,"
<< "Left Foot (" << m_Force_Id_Left_Foot << ") ,"
<< "Right Foot (" << m_Force_Id_Right_Foot << ") " << std::endl;
os << "Left Hand (" << m_Force_Id_Left_Hand << ") ," << "Right Hand ("
<< m_Force_Id_Right_Hand << ") ," << "Left Foot (" << m_Force_Id_Left_Foot
<< ") ," << "Right Foot (" << m_Force_Id_Right_Foot << ") " << std::endl;
}

/**************** FromURDFToSot *************************/
Expand Down
6 changes: 2 additions & 4 deletions tests/sot/test_solverSoth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,11 @@ void deparse(std::vector<bubMatrix> Jes, std::vector<bubVector> ees,
if (boundSide[i] & ConstraintMem::BOUND_INF) {
for (unsigned int j = 0; j < Ji.size2(); ++j)
cout << -Ji(i, j) << " ";
cout << "\t"
<< " X " << -eiInf(i) << endl;
cout << "\t" << " X " << -eiInf(i) << endl;
}
if (boundSide[i] & ConstraintMem::BOUND_SUP) {
for (unsigned int j = 0; j < Ji.size2(); ++j) cout << Ji(i, j) << " ";
cout << "\t"
<< " X " << eiSup(i) << endl;
cout << "\t" << " X " << eiSup(i) << endl;
}
}
}
Expand Down
39 changes: 13 additions & 26 deletions tests/task/test_flags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,21 @@ int main(void) {
cout << "Entering test" << endl;
Flags f1(128 * 112 + 84);
Flags f2(198);
cout << "f1 "
<< "\t" << f1 << endl;
cout << "f2 "
<< "\t" << f2 << endl;
cout << "f1 " << "\t" << f1 << endl;
cout << "f2 " << "\t" << f2 << endl;

cout << endl;
cout << "1|2 "
<< "\t" << (f1 | f2) << endl;
cout << "1&2 "
<< "\t" << (f1 & f2) << endl;
cout << "TRUE "
<< "\t" << (Flags(true)) << endl;
cout << "1&TRUE"
<< "\t" << (f1 & Flags(true)) << endl;
cout << "1&!2 "
<< "\t" << ((!f2) & f1) << endl;
cout << "1XOR2 "
<< "\t" << (((!f2) & f1) | ((!f1) & f2)) << endl;
cout << "1|2 " << "\t" << (f1 | f2) << endl;
cout << "1&2 " << "\t" << (f1 & f2) << endl;
cout << "TRUE " << "\t" << (Flags(true)) << endl;
cout << "1&TRUE" << "\t" << (f1 & Flags(true)) << endl;
cout << "1&!2 " << "\t" << ((!f2) & f1) << endl;
cout << "1XOR2 " << "\t" << (((!f2) & f1) | ((!f1) & f2)) << endl;

cout << endl;
cout << "f1 "
<< "\t" << f1 << endl;
cout << "!2 "
<< "\t" << !f2 << endl;
cout << "1|!2 "
<< "\t" << (f1 | (!f2)) << endl;
cout << "f1 " << "\t" << f1 << endl;
cout << "!2 " << "\t" << !f2 << endl;
cout << "1|!2 " << "\t" << (f1 | (!f2)) << endl;

cout << endl;
if (f1 & f2)
Expand All @@ -61,10 +50,8 @@ int main(void) {
cout << endl;

cout << endl;
cout << "f1>>3 "
<< "\t" << Flags(f1 >> 3) << endl;
cout << "f1>>5 "
<< "\t" << Flags(f1 >> 5) << endl;
cout << "f1>>3 " << "\t" << Flags(f1 >> 3) << endl;
cout << "f1>>5 " << "\t" << Flags(f1 >> 5) << endl;

cout << "f1 byte per byte:";
for (int i = 0; i < 16; ++i) {
Expand Down

0 comments on commit e8e7194

Please sign in to comment.