KukaLBRiiwaROSPlugin_REMOTE_26696.hpp
Go to the documentation of this file.
1 #ifndef GRL_ROS_BRIDGE_HPP_
2 #define GRL_ROS_BRIDGE_HPP_
3 
4 #include <iostream>
5 #include <memory>
6 #include <array>
7 
8 #include <boost/log/trivial.hpp>
9 #include <boost/exception/all.hpp>
10 #include <boost/algorithm/string.hpp>
11 #include <boost/thread/mutex.hpp>
12 #include <boost/thread/locks.hpp>
13 
14 #include <ros/ros.h>
15 #include <trajectory_msgs/JointTrajectory.h>
16 #include <trajectory_msgs/JointTrajectoryPoint.h>
17 #include <sensor_msgs/JointState.h>
18 #include <std_msgs/String.h>
19 
20 #include <cartesian_impedance_msgs/SetCartesianImpedance.h>
21 #include <cartesian_impedance_msgs/SetCartesianForceCtrl.h>
22 
23 #include "grl/kuka/KukaDriver.hpp"
27 
28 //this is for conversion fom meters to mm
29 #define meters_to_mm 1000
30 
31 
32 /// @todo move elsewhere, because it will conflict with others' implementations of outputting vectors
33 template<typename T>
34 inline boost::log::formatting_ostream& operator<<(boost::log::formatting_ostream& out, std::vector<T>& v)
35 {
36  out << "[";
37  size_t last = v.size() - 1;
38  for(size_t i = 0; i < v.size(); ++i) {
39  out << v[i];
40  if (i != last)
41  out << ", ";
42  }
43  out << "]";
44  return out;
45 }
46 
47 namespace grl {
48 
49  namespace ros {
50 
51  /**
52  *
53  * This class contains code to offer a simple communication layer between ROS and the KUKA LBR iiwa
54  *
55  * @todo Main Loop Update Rate must be supplied to underlying Driver for FRI mode. see KukaLBRiiwaVrepPlugin for reference, particularly kukaDriverP_->set(simulationTimeStep_,time_duration_command_tag());
56  */
57  class KukaLBRiiwaROSPlugin : public std::enable_shared_from_this<KukaLBRiiwaROSPlugin>
58  {
59  public:
60 
61  enum ParamIndex {
62  RobotName,
63  RobotModel,
72  };
73 
74  typedef std::tuple<
75  std::string,
76  std::string,
77  std::string,
78  std::string,
79  std::string,
80  std::string,
81  std::string,
82  std::string,
83  std::string,
84  std::string
85  > Params;
86 
87 
88  static const Params defaultParams(){
89  return std::make_tuple(
90  "Robotiiwa" , // RobotName,
91  "KUKA_LBR_IIWA_14_R820" , // RobotModel (options are KUKA_LBR_IIWA_14_R820, KUKA_LBR_IIWA_7_R800)
92  "tcp://0.0.0.0:30010" , // LocalZMQAddress
93  "tcp://172.31.1.147:30010", // RemoteZMQAddress
94  "192.170.10.100" , // LocalHostKukaKoniUDPAddress,
95  "30200" , // LocalHostKukaKoniUDPPort,
96  "192.170.10.2" , // RemoteHostKukaKoniUDPAddress,
97  "30200" , // RemoteHostKukaKoniUDPPort
98  "JAVA" , // KukaCommandMode (options are FRI, JAVA)
99  "FRI" // KukaMonitorMode (options are FRI, JAVA)
100  );
101  }
102 
104  ::ros::NodeHandle nh_tilde("~");
105 
106  nh_tilde.getParam("RobotName",std::get<RobotName>(params));
107  nh_tilde.getParam("RobotModel",std::get<RobotModel>(params));
108  nh_tilde.getParam("LocalZMQAddress",std::get<LocalZMQAddress>(params));
109  nh_tilde.getParam("RemoteZMQAddress",std::get<RemoteZMQAddress>(params));
110  nh_tilde.getParam("LocalHostKukaKoniUDPAddress",std::get<LocalHostKukaKoniUDPAddress>(params));
111  nh_tilde.getParam("LocalHostKukaKoniUDPPort",std::get<LocalHostKukaKoniUDPPort>(params));
112  nh_tilde.getParam("RemoteHostKukaKoniUDPAddress",std::get<RemoteHostKukaKoniUDPAddress>(params));
113  nh_tilde.getParam("RemoteHostKukaKoniUDPPort",std::get<RemoteHostKukaKoniUDPPort>(params));
114  nh_tilde.getParam("KukaCommandMode",std::get<KukaCommandMode>(params));
115  nh_tilde.getParam("KukaMonitorMode",std::get<KukaMonitorMode>(params));
116 
117  return params;
118  }
119 
120  /// unique tag type so State never
121  /// conflicts with a similar tuple
122  struct JointStateTag{};
123 
126  JointForce,
130  JointMatrix,
132  };
133 
134 
135  typedef std::vector<double> JointScalar;
136 
137  /// @see http://www.coppeliarobotics.com/helpFiles/en/apiFunctions.htm#simGetJointMatrix for data layout information
138  typedef std::array<double,12> TransformationMatrix;
139  typedef std::vector<TransformationMatrix> TransformationMatrices;
140 
141  typedef std::tuple<
142  JointScalar, // jointPosition
143  // JointScalar // JointVelocity // no velocity yet
144  JointScalar, // jointForce
145  JointScalar, // jointTargetPosition
146  JointScalar, // JointLowerPositionLimit
147  JointScalar, // JointUpperPositionLimit
148  TransformationMatrices, // jointTransformation
149  robot::arm::KukaJAVAdriver::JointStateTag // JointStateTag unique identifying type so tuple doesn't conflict
150  > State;
151 
152 
154  : debug(false),params_(params), nh_("")
155  {
156  loadRosParams(params_);
157  }
158 
159  void construct(){ construct(params_);}
160 
161  /// @todo create a function that calls simGetObjectHandle and throws an exception when it fails
162  /// @warning getting the ik group is optional, so it does not throw an exception
163  void construct(Params params) {
164 
165  current_js_.name.resize(7);
166  current_js_.name[0] = "iiwa_joint_1";
167  current_js_.name[1] = "iiwa_joint_2";
168  current_js_.name[2] = "iiwa_joint_3";
169  current_js_.name[3] = "iiwa_joint_4";
170  current_js_.name[4] = "iiwa_joint_5";
171  current_js_.name[5] = "iiwa_joint_6";
172  current_js_.name[6] = "iiwa_joint_7";
173  current_js_.velocity.resize(7);
174  current_js_.velocity[0] = 0.;
175  current_js_.velocity[1] = 0.;
176  current_js_.velocity[2] = 0.;
177  current_js_.velocity[3] = 0.;
178  current_js_.velocity[4] = 0.;
179  current_js_.velocity[5] = 0.;
180  current_js_.velocity[6] = 0.;
181 
182  ::ros::NodeHandle nh;
183  js_pub_ = nh.advertise<sensor_msgs::JointState>("joint_states",100);
184  jt_sub_ = nh.subscribe<trajectory_msgs::JointTrajectory>("joint_traj_cmd", 1000, &KukaLBRiiwaROSPlugin::jt_callback, this);
185  jt_pt_sub_ = nh.subscribe<trajectory_msgs::JointTrajectoryPoint>("joint_traj_pt_cmd", 1000, &KukaLBRiiwaROSPlugin::jt_pt_callback, this);
186  mode_sub_ = nh.subscribe<std_msgs::String>("interaction_mode", 1000, &KukaLBRiiwaROSPlugin::mode_callback, this);
187 
188  dummy_sub_ = nh.subscribe<std_msgs::String>("dummy_topic", 1000, &KukaLBRiiwaROSPlugin::dummy_callback, this);
189  cart_imp_sub_ = nh.subscribe<cartesian_impedance_msgs::SetCartesianImpedance>("set_cartesian_impedance_params", 1000, &KukaLBRiiwaROSPlugin::set_cartesian_impedance_callback, this);
190  cart_ft_sub_ = nh.subscribe<cartesian_impedance_msgs::SetCartesianForceCtrl>("set_cartesian_ft_params", 1000, &KukaLBRiiwaROSPlugin::set_force_control_callback, this);
191 
192  ROS_INFO("done creating subscribers");
193  //jt_sub_ = nh.subscribe<trajectory_msgs::JointTrajectory>("joint_traj_cmd",1000,boost::bind(&KukaLBRiiwaROSPlugin::jt_callback, this, _1));
194 
195  params_ = params;
196  // keep driver threads from exiting immediately after creation, because they have work to do!
197  device_driver_workP_.reset(new boost::asio::io_service::work(device_driver_io_service));
198 
199  /// @todo properly support passing of io_service
200  KukaDriverP_.reset(
202  //device_driver_io_service,
203  params
204  // std::make_tuple(
205  // std::string(std::std::get<LocalHostKukaKoniUDPAddress > (params)),
206  // std::string(std::std::get<LocalHostKukaKoniUDPPort > (params)),
207  // std::string(std::std::get<RemoteHostKukaKoniUDPAddress> (params)),
208  // std::string(std::std::get<RemoteHostKukaKoniUDPPort > (params)),
209  // grl::robot::arm::KukaFRIClientDataDriver::run_automatically
210  // )
211  )
212 
213  );
214  KukaDriverP_->construct();
215  }
216 
217 
218 
219 
220  bool setState(State& state) { return true; }
221 
222 
223  const Params & getParams(){
224  return params_;
225  }
226 
227  /**
228  * ROS joint trajectory callback
229  * this code needs to execute the joint trajectory on the robot
230  */
231  void jt_callback(const trajectory_msgs::JointTrajectoryConstPtr &msg) {
232  boost::lock_guard<boost::mutex> lock(jt_mutex);
233 
234 
235  for(auto &pt: msg->points) {
236  // positions velocities ac
237  if (pt.positions.size() != KUKA::LBRState::NUM_DOF) {
238  BOOST_THROW_EXCEPTION(std::runtime_error("Malformed joint trajectory request! Wrong number of joints."));
239  }
240 
241  // handle
242  //simJointPosition
243  simJointPosition.clear();
244  boost::copy(pt.positions,std::back_inserter(simJointPosition));
245  //simJointVelocity
246  simJointVelocity.clear();
247  boost::copy(pt.velocities,std::back_inserter(simJointVelocity));
248  //simJointForce
249  simJointForce.clear();
250  boost::copy(pt.effort,std::back_inserter(simJointForce));
251 
252  ///@todo: execute the rest of the trajectory
253  break;
254  }
255 
256  }
257 
258  /// ROS callback to set current interaction mode; determines whether commands will be send in SERVO, TEACH, etc
259  void mode_callback(const std_msgs::StringConstPtr &msg) {
260  boost::lock_guard<boost::mutex> lock(jt_mutex);
261  simJointPosition.clear();
262  // boost::copy(current_js_.position,std::back_inserter(simJointPosition));
263  // if(simJointPosition.size()) KukaDriverP_->set( simJointPosition, grl::revolute_joint_angle_open_chain_command_tag());
264 
265  // simJointPosition.clear();
266  // //simJointVelocity
267  // simJointVelocity.clear();
268  // //simJointForce
269  // simJointForce.clear();
270 
271  //std::cerr << "Mode command = " << msg->data.c_str() << "\n";
272  if (debug) {
273  ROS_INFO("Receiving mode command: %s", msg->data.c_str());
274  }
275 
276  unsigned int ArmStateLen = 9;
277  for (unsigned int i = 0; i < ArmStateLen; ++i) {
278  if (msg->data == grl::flatbuffer::EnumNamesArmState()[i]) {
279 
280  if (debug) {
281  std::string info = std::string("Valid grl::flatbuffer::ArmState command received for ") + grl::flatbuffer::EnumNamesArmState()[i] + std::string(" mode");
282  ROS_INFO(info.c_str());
283  }
284 
285  interaction_mode = static_cast<grl::flatbuffer::ArmState>(i);
286  KukaDriverP_->set(interaction_mode);
287  break;
288  }
289  }
290 
291  }
292  void dummy_callback(const std_msgs::StringConstPtr &msg)
293  {
294  boost::lock_guard<boost::mutex> lock(jt_mutex);
295 
296  ROS_INFO("Dummy message set!");
297  KukaDriverP_->set(msg->data);
298  //KukaDriverP_->set();
299 
300  }
301  void set_cartesian_impedance_callback(const cartesian_impedance_msgs::SetCartesianImpedanceConstPtr &cartImpedance)
302  {
303  boost::lock_guard<boost::mutex> lock(jt_mutex);
304  ROS_INFO("Changing Cartesian Impedance Parameters");
305  //
306  // simJointPosition.clear();
307  // boost::copy(current_js_.position,std::back_inserter(simJointPosition));
308  // if(simJointPosition.size()) KukaDriverP_->set( simJointPosition, grl::revolute_joint_angle_open_chain_command_tag());
309 
310  //Cartesian stiffness msg values to the flatbuffers
311  grl::flatbuffer::Vector3d cart_stifness_trans(cartImpedance->stiffness.translational.x,cartImpedance->stiffness.translational.y,cartImpedance->stiffness.translational.z);
312  grl::flatbuffer::EulerRotation cart_stifness_rot(cartImpedance->stiffness.rotational.x,cartImpedance->stiffness.rotational.y,cartImpedance->stiffness.rotational.z,grl::flatbuffer::EulerOrder_xyz);
313 
314  KukaDriverP_->set(cart_stifness_trans,cart_stifness_rot,cart_stiffness_values());
315 
316 
317  //Cartesian damping values pass to the flatbuffers
318  grl::flatbuffer::Vector3d cart_damping_trans(cartImpedance->damping.translational.x,cartImpedance->damping.translational.y,cartImpedance->damping.translational.z);
319  grl::flatbuffer::EulerRotation cart_damping_rot(cartImpedance->damping.rotational.x,cartImpedance->damping.rotational.y,cartImpedance->damping.rotational.z,grl::flatbuffer::EulerOrder_xyz);
320 
321  KukaDriverP_->set(cart_damping_trans,cart_damping_rot,cart_damping_values());
322 
323  //Max Cartesian Path deviation when in cartesian impedance
324  //Cartesian max Cartesian velocities [m] for translation and [rad] for rotation
325  //iiwa expects the values to be in mm/s for *cart_max_path_deviation*
326  grl::flatbuffer::Vector3d cart_max_path_dev_trans(cartImpedance->max_path_deviation.translation.x*meters_to_mm,cartImpedance->max_path_deviation.translation.y*meters_to_mm,cartImpedance->max_path_deviation.translation.z*meters_to_mm);
327  grl::flatbuffer::EulerRotation cart_max_path_dev_vel_rot(cartImpedance->max_path_deviation.rotation.x,cartImpedance->max_path_deviation.rotation.y,cartImpedance->max_path_deviation.rotation.z,grl::flatbuffer::EulerOrder_xyz);
328 
329 
330  grl::flatbuffer::EulerPose cart_max_path_deviation(cart_max_path_dev_trans,cart_max_path_dev_vel_rot);
331  KukaDriverP_->set(cart_max_path_deviation,max_path_deviation());
332 
333 
334  //Max Cartesian velocities [m/s] for translation and [rad/s] for rotation
335  // iiwa expect the values to be mm/s for the *cart_max_ctrl_vel_trans*
336  grl::flatbuffer::Vector3d cart_max_ctrl_vel_trans(cartImpedance->max_cart_vel.set.linear.x*meters_to_mm,cartImpedance->max_cart_vel.set.linear.y*meters_to_mm,cartImpedance->max_cart_vel.set.linear.z*meters_to_mm);
337  grl::flatbuffer::EulerRotation cart_max_ctrl_vel_rot(cartImpedance->max_cart_vel.set.angular.x,cartImpedance->max_cart_vel.set.angular.y,cartImpedance->max_cart_vel.set.angular.z,grl::flatbuffer::EulerOrder_xyz);
338 
339  grl::flatbuffer::EulerPose cart_max_ctrl_vel(cart_max_ctrl_vel_trans,cart_max_ctrl_vel_rot);
340  KukaDriverP_->set(cart_max_ctrl_vel,max_cart_vel());
341 
342  //Max Control Force [N] for translation and [Nm] for rotation
343  grl::flatbuffer::Vector3d cart_max_ctrl_force_trans(cartImpedance->max_ctrl_force.set.force.x,cartImpedance->max_ctrl_force.set.force.y,cartImpedance->max_ctrl_force.set.force.z);
344  grl::flatbuffer::EulerRotation cart_max_ctrl_force_rot(cartImpedance->max_ctrl_force.set.torque.x,cartImpedance->max_ctrl_force.set.torque.y,cartImpedance->max_ctrl_force.set.torque.z,grl::flatbuffer::EulerOrder_xyz);
345 
346  grl::flatbuffer::EulerPose cart_max_ctrl_force(cart_max_ctrl_force_trans,cart_max_ctrl_force_rot);
347 
348  // //send position after state change
349  // simJointPosition.clear();
350  // boost::copy(current_js_.position,std::back_inserter(simJointPosition));
351  // if(simJointPosition.size()) KukaDriverP_->set( simJointPosition, grl::revolute_joint_angle_open_chain_command_tag());
352 
353  KukaDriverP_->set(cart_max_ctrl_force,max_ctrl_force());
354 
355  double nullspaceStiffness;
356  double nullspaceDamping;
357 
358  nullspaceDamping = cartImpedance->null_space_params.damping[0];
359  nullspaceStiffness = cartImpedance->null_space_params.stiffness[0];
360 
361  // simJointPosition.clear();
362  // boost::copy(current_js_.position,std::back_inserter(simJointPosition));
363  // if(simJointPosition.size()) KukaDriverP_->set( simJointPosition, grl::revolute_joint_angle_open_chain_command_tag());
364 
365  KukaDriverP_->set(nullspaceStiffness,nullspaceDamping,null_space_params());
366 
367  // simJointPosition.clear();
368  // boost::copy(current_js_.position,std::back_inserter(simJointPosition));
369  // if(simJointPosition.size()) KukaDriverP_->set( simJointPosition, grl::revolute_joint_angle_open_chain_command_tag());
370 
371 
372 
373  }
374  void set_force_control_callback(const cartesian_impedance_msgs::SetCartesianForceCtrlConstPtr &cartFTCtrl)
375  {
376  boost::lock_guard<boost::mutex> lock(jt_mutex);
377  std::string DOF;
378  double force;
379  double stiffness;
380 
381  // simJointPosition.clear();
382  // boost::copy(current_js_.position,std::back_inserter(simJointPosition));
383  // if(simJointPosition.size()) KukaDriverP_->set( simJointPosition, grl::revolute_joint_angle_open_chain_command_tag());
384 
385  KukaDriverP_->set(cartFTCtrl->DOF.c_str(),cartFTCtrl->force,cartFTCtrl->stiffness,set_const_ctrl_force());
386 
387 
388  // simJointPosition.clear();
389  // boost::copy(current_js_.position,std::back_inserter(simJointPosition));
390  // if(simJointPosition.size()) KukaDriverP_->set( simJointPosition, grl::revolute_joint_angle_open_chain_command_tag());
391 
392  //ROS_INFO("Set Cartesian Constant Force/torqe Control; %s",cartFTCtrl->DOF.c_str());
393  }
394 
395  /// ROS joint trajectory callback
396  /// this code needs to execute the joint trajectory on the robot
397  void jt_pt_callback(const trajectory_msgs::JointTrajectoryPointConstPtr &msg) {
398  boost::lock_guard<boost::mutex> lock(jt_mutex);
399 
400  // positions velocities ac
401  if (msg->positions.size() != KUKA::LBRState::NUM_DOF) {
402  BOOST_THROW_EXCEPTION(std::runtime_error("Malformed joint trajectory request! Wrong number of joints."));
403  }
404 
405  // handle
406  //simJointPosition
407  simJointPosition.clear();
408  boost::copy(msg->positions,std::back_inserter(simJointPosition));
409  //simJointVelocity
410  simJointVelocity.clear();
411  boost::copy(msg->velocities,std::back_inserter(simJointVelocity));
412  //simJointForce
413  simJointForce.clear();
414  boost::copy(msg->effort,std::back_inserter(simJointForce));
415 
416  ROS_INFO("Im in Joint trajectory msgs!!");
417 
418  ///@todo: execute the rest of the trajectory
419  }
420 
421 
423  device_driver_workP_.reset();
424 
425  if(driver_threadP){
427  driver_threadP->join();
428  }
429  }
430 
431  ///
432  /// @brief spin once, call this repeatedly to run the driver
433  ///
434  ///
435  bool run_one()
436  {
437 
438  bool haveNewData = false;
439 
440  if(KukaDriverP_){
441 
442 
443  switch(interaction_mode) {
445  if (debug) {
446  ROS_INFO("Arm is in SERVO Mode");
447  }
449  /// @todo setting joint position clears joint force in KukaDriverP_. Is this right or should position and force be configurable simultaeously?
450  //if(simJointForce.size()) KukaDriverP_->set( simJointForce, grl::revolute_joint_torque_open_chain_command_tag());
451  break;
453  if (debug) {
454  ROS_INFO("Arm is in TEACH mode");
455  }
456  break;
457  break;
459  break;
461  break;
463  if (debug) {
464  ROS_INFO("Sending start!");
465  }
466  break;
468  break;
469  default:
470  if (debug) {
471  ROS_INFO("KukaLBRiiwaROSPlugin in unsupported mode!");
472  }
473 
474  }
475 
476  haveNewData = KukaDriverP_->run_one();
477 
478  if(haveNewData)
479  {
480 
481  // We have the real kuka state read from the device now
482  // update real joint angle data
483  current_js_.position.clear();
484  KukaDriverP_->get(std::back_inserter(current_js_.position), grl::revolute_joint_angle_open_chain_state_tag());
485 
486  current_js_.effort.clear();
487  KukaDriverP_->get(std::back_inserter(current_js_.effort), grl::revolute_joint_torque_open_chain_state_tag());
488 
489  //current_js_.velocity.clear();
490  //grl::robot::arm::copy(friData_->monitoringMsg, std::back_inserter(current_js_.velocity), grl::revolute_joint_angle_open_chain_state_tag());
491  current_js_.header.stamp = ::ros::Time::now();
492  current_js_.header.seq += 1;
493  js_pub_.publish(current_js_);
494  }
495 
496  }
497 
498  return haveNewData;
499  }
500 
501  boost::asio::io_service device_driver_io_service;
502  std::unique_ptr<boost::asio::io_service::work> device_driver_workP_;
503  std::unique_ptr<std::thread> driver_threadP;
504 
505  /// @todo replace all these simJoint elements with simple KukaLBRiiwaROSPlugin::State
506  std::vector<double> simJointPosition;// = {0.0,0.0,0.0,0.0,0.0,0.0,0.0};
507  std::vector<double> simJointVelocity = {0.0,0.0,0.0,0.0,0.0,0.0,0.0};
508  std::vector<double> simJointForce;// = {0.0,0.0,0.0,0.0,0.0,0.0,0.0};
509  std::vector<double> simJointTargetPosition = {0.0,0.0,0.0,0.0,0.0,0.0,0.0};
511 
512  /// @note loss of precision! kuka sends double values, if you write custom code don't use these float values. Vrep uses floats internally which is why they are used here.
513  std::vector<double> realJointPosition = { 0, 0, 0, 0, 0, 0, 0 };
514  // does not exist
515  std::vector<double> realJointForce = { 0, 0, 0, 0, 0, 0, 0 };
516 
517  std::string dummy_message;
518 
519  private:
520 
521  bool debug;
522  grl::flatbuffer::ArmState interaction_mode;
523  // grl::flatbuffer::KUKAiiwaArmConfiguration cart_impedance;
524 
525  boost::mutex jt_mutex;
526  boost::shared_ptr<robot::arm::KukaDriver> KukaDriverP_;
527  Params params_;
528 
529  ::ros::Subscriber jt_sub_; // subscribes to joint state trajectories and executes them
530  ::ros::Subscriber jt_pt_sub_; // subscribes to joint state trajectories and executes them
531  ::ros::Subscriber mode_sub_; // subscribes to interaction mode messages (strings for now)
532  ::ros::Subscriber dummy_sub_;
533  ::ros::Subscriber cart_imp_sub_;
534  ::ros::Subscriber cart_ft_sub_;
535 
536  ::ros::Publisher js_pub_; // publish true joint states from the KUKA
537 
538 
539  sensor_msgs::JointState current_js_;
540 
541  ::ros::NodeHandle nh_;
542 
543 
544  };
545  }
546 }
547 
548 
549 #endif
void set_force_control_callback(const cartesian_impedance_msgs::SetCartesianForceCtrlConstPtr &cartFTCtrl)
void jt_pt_callback(const trajectory_msgs::JointTrajectoryPointConstPtr &msg)
bool run_one()
spin once, call this repeatedly to run the driver
std::vector< double > simJointTargetPosition
void jt_callback(const trajectory_msgs::JointTrajectoryConstPtr &msg)
OutputIterator copy(std::string model, OutputIterator it, grl::revolute_joint_velocity_open_chain_state_constraint_tag)
copy vector of joint velocity limits in radians/s
Definition: Kuka.hpp:131
boost::asio::io_service device_driver_io_service
const char ** EnumNamesArmState()
Kuka LBR iiwa Primary Multi Mode Driver, supports communication over FRI and JAVA interfaces...
Definition: KukaDriver.hpp:41
std::tuple< JointScalar, JointScalar, JointScalar, JointScalar, JointScalar, TransformationMatrices, robot::arm::KukaJAVAdriver::JointStateTag > State
const int NUM_DOF
Definition: Kuka.hpp:19
void mode_callback(const std_msgs::StringConstPtr &msg)
ROS callback to set current interaction mode; determines whether commands will be send in SERVO...
KukaLBRiiwaROSPlugin(Params params=defaultParams())
std::unique_ptr< boost::asio::io_service::work > device_driver_workP_
void set_cartesian_impedance_callback(const cartesian_impedance_msgs::SetCartesianImpedanceConstPtr &cartImpedance)
std::unique_ptr< std::thread > driver_threadP
std::tuple< std::string, std::string, std::string, std::string, std::string, std::string, std::string, std::string, std::string, std::string > Params
KukaLBRiiwaROSPlugin::TransformationMatrices simJointTransformationMatrix
std::vector< TransformationMatrix > TransformationMatrices
void dummy_callback(const std_msgs::StringConstPtr &msg)