Skip to content

Commit

Permalink
clang-format adjustements 2
Browse files Browse the repository at this point in the history
  • Loading branch information
sophielueth committed Feb 7, 2024
1 parent 1b14a5c commit 983eba7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/JointSpaceCompliantController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#include <cmath>
#include <functional>
#include <stdexcept>
#include <math.h>

#include <gen3_compliant_controllers/JointSpaceCompliantController.hpp>
#include <hardware_interface/joint_command_interface.h>
#include <hardware_interface/joint_state_interface.h>
#include <math.h>
#include <pluginlib/class_list_macros.h>

#include "pinocchio/algorithm/joint-configuration.hpp"
Expand Down Expand Up @@ -275,7 +275,8 @@ void JointSpaceCompliantController::update(const ros::Time& time, const ros::Dur
mDesiredThetaDot = mDesiredVelocity;

Eigen::VectorXd mErrorTheta = mNominalThetaPrev - mDesiredTheta;
Eigen::VectorXd add_pis = (mErrorTheta.array() > M_PI).select(Eigen::VectorXd::Constant(mNumControlledDofs, -2 * M_PI), Eigen::VectorXd::Constant(mNumControlledDofs, 0)); // account for jump pi -> -pi
Eigen::VectorXd add_pis
= (mErrorTheta.array() > M_PI).select(Eigen::VectorXd::Constant(mNumControlledDofs, -2 * M_PI), Eigen::VectorXd::Constant(mNumControlledDofs, 0)); // account for jump pi -> -pi
add_pis += (mErrorTheta.array() <= -M_PI).select(Eigen::VectorXd::Constant(mNumControlledDofs, 2 * M_PI), Eigen::VectorXd::Constant(mNumControlledDofs, 0)); // account for jump -pi -> pi
if (mNumControlledDofs == 6)
{
Expand Down

0 comments on commit 983eba7

Please sign in to comment.