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 Nov 4, 2024
1 parent bfa9d6f commit 2027c03
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 26 deletions.
6 changes: 3 additions & 3 deletions include/mc_rtc/Schema.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ struct Operations
std::function<void(const void * self, Configuration & out)> save = [](const void *, Configuration &) {};

/** Write to a MessagePackBuilder */
std::function<void(const void * self, MessagePackBuilder & builder)> write = [](const void *, MessagePackBuilder &) {
};
std::function<void(const void * self, MessagePackBuilder & builder)> write = [](const void *,
MessagePackBuilder &) {};

/** Load from a configuration object */
std::function<void(void * self, const Configuration & in)> load = [](void *, const Configuration &) {};
Expand Down Expand Up @@ -297,7 +297,7 @@ struct Operations
*
* \param choices Possible choices when \tparam HasChoices is true
*/
template<typename T, typename Schema, T Schema::*ptr, ValueFlag Flags = ValueFlag::All, bool HasChoices = false>
template<typename T, typename Schema, T Schema::* ptr, ValueFlag Flags = ValueFlag::All, bool HasChoices = false>
bool registerValue(details::MemberPointerWrapper<ptr>,
const std::string & name,
const std::string & description,
Expand Down
4 changes: 2 additions & 2 deletions include/mc_rtc/gui/Arrow.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct ArrowROImpl : public Element
}

/** Invalid element */
ArrowROImpl(){};
ArrowROImpl() {};

constexpr static size_t write_size() { return Element::write_size() + 3 + ArrowConfig::write_size(); }

Expand Down Expand Up @@ -72,7 +72,7 @@ struct ArrowImpl : public ArrowROImpl<GetStart, GetEnd>
}

/** Invalid element */
ArrowImpl(){};
ArrowImpl() {};

void write(mc_rtc::MessagePackBuilder & builder) { ArrowROImpl<GetStart, GetEnd>::write(builder, false); }

Expand Down
3 changes: 2 additions & 1 deletion include/mc_rtc/log/iterate_binary_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ inline bool iterate_binary_log(const std::string & fpath,
{
return iterate_binary_log(
fpath,
[&callback](IterateBinaryLogData data) {
[&callback](IterateBinaryLogData data)
{
return callback(data.keys, data.records, data.time.value_or(-1), data.copy_cb, data.raw_data,
data.raw_data_size);
},
Expand Down
4 changes: 1 addition & 3 deletions include/mc_solver/utils/Update.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ namespace mc_solver
namespace utils
{

struct MC_SOLVER_DLLAPI UpdateTag
{
};
struct MC_SOLVER_DLLAPI UpdateTag{};

template<typename UpdateNrVars>
struct Update : public UpdateNrVars, UpdateTag
Expand Down
4 changes: 2 additions & 2 deletions include/mc_tasks/lipm_stabilizer/StabilizerTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ struct MC_TASKS_DLLAPI StabilizerTask : public MetaTask
* @param offset_gamma [out] - Com offset
* @param coef_alpha [out] - ZmP coefficient
*/
template<sva::ForceVecd ExternalWrench::*TargetOrMeasured>
template<sva::ForceVecd ExternalWrench::* TargetOrMeasured>
void computeWrenchOffsetAndCoefficient(const mc_rbdyn::Robot & robot,
Eigen::Vector3d & offset_gamma,
double & coef_kappa) const;
Expand All @@ -793,7 +793,7 @@ struct MC_TASKS_DLLAPI StabilizerTask : public MetaTask
* @param robot Robot used to transform surface wrenches (control robot or real robot)
* @param com Robot CoM
*/
template<sva::ForceVecd ExternalWrench::*TargetOrMeasured>
template<sva::ForceVecd ExternalWrench::* TargetOrMeasured>
sva::ForceVecd computeExternalWrenchSum(const mc_rbdyn::Robot & robot, const Eigen::Vector3d & com) const;

/** @brief Compute the position, force, and moment of the external contacts in the world frame.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ AdmittanceSampleController::AdmittanceSampleController(mc_rbdyn::RobotModulePtr
Backend backend)
: mc_control::fsm::Controller(rm, dt, config, backend)
{
datastore().make_call("KinematicAnchorFrame::" + robot().name(),
[](const mc_rbdyn::Robot & robot) {
return sva::interpolate(robot.surfacePose("LeftFoot"), robot.surfacePose("RightFoot"), 0.5);
});
datastore().make_call(
"KinematicAnchorFrame::" + robot().name(), [](const mc_rbdyn::Robot & robot)
{ return sva::interpolate(robot.surfacePose("LeftFoot"), robot.surfacePose("RightFoot"), 0.5); });
}

void AdmittanceSampleController::reset(const mc_control::ControllerResetData & reset_data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ ExternalForcesController::ExternalForcesController(mc_rbdyn::RobotModulePtr rm,
Backend backend)
: mc_control::fsm::Controller(rm, dt, config, backend)
{
datastore().make_call("KinematicAnchorFrame::" + robot().name(),
[](const mc_rbdyn::Robot & robot) {
return sva::interpolate(robot.surfacePose("LeftFoot"), robot.surfacePose("RightFoot"), 0.5);
});
datastore().make_call(
"KinematicAnchorFrame::" + robot().name(), [](const mc_rbdyn::Robot & robot)
{ return sva::interpolate(robot.surfacePose("LeftFoot"), robot.surfacePose("RightFoot"), 0.5); });
}

void ExternalForcesController::reset(const mc_control::ControllerResetData & reset_data)
Expand Down
3 changes: 2 additions & 1 deletion src/mc_rbdyn/gui/RobotConvex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ void addConvexToGUI(mc_rtc::gui::StateBuilder & gui,
{
publish_object(mc_rtc::gui::Cylinder(
publishName.value_or(name),
[cylinder]() {
[cylinder]()
{
return mc_rtc::gui::CylinderParameters{cylinder->getRadius(), (cylinder->getP2() - cylinder->getP1()).norm()};
},
get_pose, mc_rtc::gui::Color::Green));
Expand Down
4 changes: 2 additions & 2 deletions src/mc_tasks/lipm_stabilizer/StabilizerTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ void StabilizerTask::setExternalWrenches(const std::vector<std::string> & surfac
computeWrenchOffsetAndCoefficient<&ExternalWrench::target>(robot(), comOffsetTarget_, zmpCoefTarget_);
}

template<sva::ForceVecd StabilizerTask::ExternalWrench::*TargetOrMeasured>
template<sva::ForceVecd StabilizerTask::ExternalWrench::* TargetOrMeasured>
void StabilizerTask::computeWrenchOffsetAndCoefficient(const mc_rbdyn::Robot & robot,
Eigen::Vector3d & offset_gamma,
double & coef_kappa) const
Expand Down Expand Up @@ -669,7 +669,7 @@ void StabilizerTask::computeWrenchOffsetAndCoefficient(const mc_rbdyn::Robot & r
offset_gamma /= zeta;
}

template<sva::ForceVecd StabilizerTask::ExternalWrench::*TargetOrMeasured>
template<sva::ForceVecd StabilizerTask::ExternalWrench::* TargetOrMeasured>
sva::ForceVecd StabilizerTask::computeExternalWrenchSum(const mc_rbdyn::Robot & robot,
const Eigen::Vector3d & com) const
{
Expand Down
7 changes: 3 additions & 4 deletions tests/controllers/TestObserverController.in.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,9 @@ struct MC_CONTROL_DLLAPI TestObserverController : public MCController
BOOST_REQUIRE(allclose(realRobot().posW().rotation(), robot().posW().rotation()));

// Add anchor frame
datastore().make_call("KinematicAnchorFrame::" + robot().name(),
[](const mc_rbdyn::Robot & robot) {
return sva::interpolate(robot.surfacePose("LeftFoot"), robot.surfacePose("RightFoot"), 0.5);
});
datastore().make_call(
"KinematicAnchorFrame::" + robot().name(), [](const mc_rbdyn::Robot & robot)
{ return sva::interpolate(robot.surfacePose("LeftFoot"), robot.surfacePose("RightFoot"), 0.5); });
}

private:
Expand Down

0 comments on commit 2027c03

Please sign in to comment.