From d4b4a572e9b36de0a4b18c6b909b3191c20e3e19 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20J=C3=A4hne?= <christoph.jaehne@franka.de>
Date: Tue, 28 Jan 2020 14:05:51 +0100
Subject: [PATCH] remove const in header for pass by value params

---
 franka_hw/include/franka_hw/franka_combinable_hw.h |  8 ++++----
 franka_hw/include/franka_hw/franka_hw.h            | 10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/franka_hw/include/franka_hw/franka_combinable_hw.h b/franka_hw/include/franka_hw/franka_combinable_hw.h
index 214473f..bc2dffd 100644
--- a/franka_hw/include/franka_hw/franka_combinable_hw.h
+++ b/franka_hw/include/franka_hw/franka_combinable_hw.h
@@ -144,16 +144,16 @@ class FrankaCombinableHW : public FrankaHW {
     return current_cmd;
   }
 
-  void publishErrorState(const bool error);
+  void publishErrorState(bool error);
 
   void setupServicesAndActionServers(ros::NodeHandle& node_handle);
 
   void initRobot() override;
 
   bool setRunFunction(const ControlMode& requested_control_mode,
-                      const bool limit_rate,
-                      const double cutoff_frequency,
-                      const franka::ControllerMode internal_controller) override;
+                      bool limit_rate,
+                      double cutoff_frequency,
+                      franka::ControllerMode internal_controller) override;
 
   void controlLoop();
 
diff --git a/franka_hw/include/franka_hw/franka_hw.h b/franka_hw/include/franka_hw/franka_hw.h
index e17a9b9..2b6ee5e 100644
--- a/franka_hw/include/franka_hw/franka_hw.h
+++ b/franka_hw/include/franka_hw/franka_hw.h
@@ -262,7 +262,7 @@ class FrankaHW : public hardware_interface::RobotHW {
    * @return True if the array contains NaN values, false otherwise.
    */
   template <size_t size>
-  static bool arrayHasNaN(const std::array<double, size> array) {
+  static bool arrayHasNaN(const std::array<double, size>& array) {
     return std::any_of(array.begin(), array.end(), [](const double& e) { return std::isnan(e); });
   }
 
@@ -365,7 +365,7 @@ class FrankaHW : public hardware_interface::RobotHW {
   template <typename T>
   void setupJointCommandInterface(std::array<double, 7>& command,
                                   franka::RobotState& state,
-                                  const bool use_q_d,
+                                  bool use_q_d,
                                   T& interface) {
     for (size_t i = 0; i < joint_names_.size(); i++) {
       hardware_interface::JointStateHandle state_handle;
@@ -427,9 +427,9 @@ class FrankaHW : public hardware_interface::RobotHW {
    * @return True if successful, false otherwise.
    */
   virtual bool setRunFunction(const ControlMode& requested_control_mode,
-                              const bool limit_rate,
-                              const double cutoff_frequency,
-                              const franka::ControllerMode internal_controller);
+                              bool limit_rate,
+                              double cutoff_frequency,
+                              franka::ControllerMode internal_controller);
   /**
    * Uses the robot_ip_ to connect to the robot via libfranka and loads the libfranka model.
    */
-- 
GitLab