@@ -73,15 +73,15 @@ FrankaConfig* Franka::get_config() {
7373 return cfg;
7474}
7575
76- FrankaState * Franka::get_state () {
76+ FrankaState* Franka::get_state () {
7777 franka::RobotState current_robot_state;
7878 if (this ->running_controller == Controller::none) {
7979 current_robot_state = this ->robot .readOnce ();
8080 } else {
8181 std::lock_guard<std::mutex> lock (this ->interpolator_mutex );
8282 current_robot_state = this ->curr_state ;
8383 }
84- auto * state = new FrankaState ();
84+ auto * state = new FrankaState ();
8585 state->robot_state = current_robot_state;
8686 return state;
8787}
@@ -141,7 +141,7 @@ void Franka::set_guiding_mode(bool x, bool y, bool z, bool roll, bool pitch,
141141 this ->robot .setGuidingMode (activated, elbow);
142142}
143143
144- void PInverse (const Eigen::MatrixXd & M, Eigen::MatrixXd & M_inv,
144+ void PInverse (const Eigen::MatrixXd& M, Eigen::MatrixXd& M_inv,
145145 double damping_factor = 0.05 ) {
146146 Eigen::JacobiSVD<Eigen::MatrixXd> svd (
147147 M, Eigen::ComputeFullU | Eigen::ComputeFullV);
@@ -158,8 +158,8 @@ void PInverse(const Eigen::MatrixXd &M, Eigen::MatrixXd &M_inv,
158158 M_inv = Eigen::MatrixXd (svd.matrixV () * S_inv * svd.matrixU ().transpose ());
159159}
160160
161- void TorqueSafetyGuardFn (std::array<double , 7 > & tau_d_array,
162- const std::array<double , 7 > & max_torques) {
161+ void TorqueSafetyGuardFn (std::array<double , 7 >& tau_d_array,
162+ const std::array<double , 7 >& max_torques) {
163163 for (size_t i = 0 ; i < tau_d_array.size (); i++) {
164164 tau_d_array[i] =
165165 std::max (std::min (tau_d_array[i], max_torques[i]), -max_torques[i]);
@@ -348,7 +348,7 @@ void Franka::osc() {
348348 avoidance_weights_ << 1 ., 1 ., 1 ., 1 ., 1 ., 10 ., 10 .;
349349
350350 try {
351- this ->robot .control ([&](const franka::RobotState & robot_state,
351+ this ->robot .control ([&](const franka::RobotState& robot_state,
352352 franka::Duration period) -> franka::Torques {
353353 std::chrono::high_resolution_clock::time_point t1 =
354354 std::chrono::high_resolution_clock::now ();
@@ -534,7 +534,7 @@ void Franka::osc() {
534534
535535 return tau_d_rate_limited;
536536 });
537- } catch (const franka::Exception & e) {
537+ } catch (const franka::Exception& e) {
538538 std::cerr << " Franka::osc() caught exception: " << e.what () << std::endl;
539539 std::cerr << " Attempting to recover from exception..." << std::endl;
540540 this ->automatic_error_recovery ();
@@ -570,7 +570,7 @@ void Franka::joint_controller() {
570570 joint_min_ << -2.8973 , -1.7628 , -2.8973 , -3.0718 , -2.8973 , -0.0175 , -2.8973 ;
571571
572572 try {
573- this ->robot .control ([&](const franka::RobotState & robot_state,
573+ this ->robot .control ([&](const franka::RobotState& robot_state,
574574 franka::Duration period) -> franka::Torques {
575575 std::chrono::high_resolution_clock::time_point t1 =
576576 std::chrono::high_resolution_clock::now ();
@@ -653,7 +653,7 @@ void Franka::joint_controller() {
653653
654654 return tau_d_rate_limited;
655655 });
656- } catch (const franka::Exception & e) {
656+ } catch (const franka::Exception& e) {
657657 std::cerr << " Franka::joint_controller() caught exception: " << e.what ()
658658 << std::endl;
659659 std::cerr << " Attempting to recover from exception..." << std::endl;
@@ -682,7 +682,7 @@ void Franka::zero_torque_controller() {
682682
683683 this ->controller_time = 0.0 ;
684684 try {
685- this ->robot .control ([&](const franka::RobotState & robot_state,
685+ this ->robot .control ([&](const franka::RobotState& robot_state,
686686 franka::Duration period) -> franka::Torques {
687687 this ->interpolator_mutex .lock ();
688688 this ->curr_state = robot_state;
@@ -694,7 +694,7 @@ void Franka::zero_torque_controller() {
694694 }
695695 return franka::Torques ({0 , 0 , 0 , 0 , 0 , 0 , 0 });
696696 });
697- } catch (const franka::Exception & e) {
697+ } catch (const franka::Exception& e) {
698698 std::cerr << " Franka::zero_torque_controller() caught exception: "
699699 << e.what () << std::endl;
700700 std::cerr << " Attempting to recover from exception..." << std::endl;
0 commit comments