35 interface_names_.emplace_back(name_ +
"/" +
"force.x");
36 interface_names_.emplace_back(name_ +
"/" +
"force.y");
37 interface_names_.emplace_back(name_ +
"/" +
"force.z");
38 interface_names_.emplace_back(name_ +
"/" +
"torque.x");
39 interface_names_.emplace_back(name_ +
"/" +
"torque.y");
40 interface_names_.emplace_back(name_ +
"/" +
"torque.z");
46 std::fill(forces_.begin(), forces_.end(), std::numeric_limits<double>::quiet_NaN());
47 std::fill(torques_.begin(), torques_.end(), std::numeric_limits<double>::quiet_NaN());
60 const std::string & interface_force_x,
const std::string & interface_force_y,
61 const std::string & interface_force_z,
const std::string & interface_torque_x,
62 const std::string & interface_torque_y,
const std::string & interface_torque_z)
65 auto check_and_add_interface = [
this](
const std::string & interface_name,
const size_t index)
67 if (!interface_name.empty())
69 interface_names_.emplace_back(interface_name);
78 check_and_add_interface(interface_force_x, 0);
79 check_and_add_interface(interface_force_y, 1);
80 check_and_add_interface(interface_force_z, 2);
81 check_and_add_interface(interface_torque_x, 3);
82 check_and_add_interface(interface_torque_y, 4);
83 check_and_add_interface(interface_torque_z, 5);
86 std::fill(forces_.begin(), forces_.end(), std::numeric_limits<double>::quiet_NaN());
87 std::fill(torques_.begin(), torques_.end(), std::numeric_limits<double>::quiet_NaN());
151 message.force.x = forces_[0];
152 message.force.y = forces_[1];
153 message.force.z = forces_[2];
154 message.torque.x = torques_[0];
155 message.torque.y = torques_[1];
156 message.torque.z = torques_[2];