control_mode.cpp
Go to the documentation of this file.
1 // Copyright (c) 2017 Franka Emika GmbH
2 // Use of this source code is governed by the Apache-2.0 license, see LICENSE
4 
5 #include <algorithm>
6 #include <iterator>
7 #include <string>
8 #include <vector>
9 
10 namespace franka_hw {
11 
12 std::ostream& operator<<(std::ostream& ostream, ControlMode mode) {
13  if (mode == ControlMode::None) {
14  ostream << "<none>";
15  } else {
16  std::vector<std::string> names;
18  names.emplace_back("joint_torque");
19  }
21  names.emplace_back("joint_position");
22  }
24  names.emplace_back("joint_velocity");
25  }
27  names.emplace_back("cartesian_velocity");
28  }
30  names.emplace_back("cartesian_pose");
31  }
32  std::copy(names.cbegin(), names.cend() - 1, std::ostream_iterator<std::string>(ostream, ", "));
33  ostream << names.back();
34  }
35  return ostream;
36 }
37 
38 } // namespace franka_hw
std::ostream & operator<<(std::ostream &ostream, ControlMode mode)


franka_hw
Author(s): Franka Emika GmbH
autogenerated on Fri Oct 23 2020 03:47:05