SchunkCanopenNode.h
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 // This file is part of the SCHUNK Canopen Driver suite.
5 //
6 // This program is free software licensed under the LGPL
7 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
8 // You can find a copy of this license in LICENSE folder in the top
9 // directory of the source code.
10 //
11 // © Copyright 2016 SCHUNK GmbH, Lauffen/Neckar Germany
12 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
13 // -- END LICENSE BLOCK ------------------------------------------------
14 
15 //----------------------------------------------------------------------
22 //----------------------------------------------------------------------
23 
24 
25 
26 #ifndef SCHUNK_CANOPEN_NODE_H_
27 #define SCHUNK_CANOPEN_NODE_H_
28 
29 #include <ros/ros.h>
30 
31 #include "control_msgs/FollowJointTrajectoryAction.h"
34 #include "std_srvs/Trigger.h"
35 #include "schunk_canopen_driver/HomeAll.h"
36 #include "schunk_canopen_driver/HomeWithIDs.h"
37 #include "schunk_canopen_driver/HomeWithJointNames.h"
38 
39 
41 
43 
44 using namespace icl_hardware;
45 using namespace canopen_schunk;
46 
48 {
49 public:
51 
52 
53 private:
56 
57  // Action interfaces for standalone mode (without ros_control)
64 
65 
70  bool enableNodes(std_srvs::TriggerRequest& req, std_srvs::TriggerResponse& resp);
71 
77  bool quickStopNodes(std_srvs::TriggerRequest& req, std_srvs::TriggerResponse& resp);
78 
88  bool homeNodesCanIds(schunk_canopen_driver::HomeWithIDsRequest& req,
89  schunk_canopen_driver::HomeWithIDsResponse& resp);
90 
100  bool homeNodesJointNames(schunk_canopen_driver::HomeWithJointNamesRequest& req,
101  schunk_canopen_driver::HomeWithJointNamesResponse& resp);
102 
107  bool homeAllNodes(schunk_canopen_driver::HomeAllRequest& req,
108  schunk_canopen_driver::HomeAllResponse& resp);
109 
110 
117  bool closeBrakes (std_srvs::TriggerRequest& req, std_srvs::TriggerResponse& resp);
118 
125  bool initDevicesCb (std_srvs::TriggerRequest& req, std_srvs::TriggerResponse& resp);
126 
131  void initDevices();
132 
136  void rosControlLoop ();
137 
138 
147 
150 
151 
153 
154  std::vector<DS402Group::Ptr> m_chain_handles;
155  std::map<std::string, uint8_t> m_joint_name_mapping;
157  boost::thread m_traj_thread;
158  boost::thread m_ros_control_thread;
159 
161 
164 
168 
171 
173 
174 };
175 
176 #endif /* SCHUNK_CANOPEN_NODE_H_ */
Configuration parameters for a Profile_Position_Mode according to CiA DSP-402 V1.1 section 12...
Definition: ds402.h:169
CanOpenController::Ptr m_controller
ros::ServiceServer m_enable_service
actionlib::ActionServer< control_msgs::FollowJointTrajectoryAction > m_action_server
std::vector< DS402Group::Ptr > m_chain_handles
boost::shared_ptr< SchunkCanopenHardwareInterface > m_hardware_interface
boost::thread m_ros_control_thread
ros::ServiceServer m_quick_stop_service
ds402::ProfilePositionModeConfiguration m_ppm_config
ros::Publisher m_joint_pub
std::map< std::string, uint8_t > m_joint_name_mapping
ros::ServiceServer m_home_service_all
ros::ServiceServer m_init_service
ros::ServiceServer m_close_brakes_service
ros::ServiceServer m_home_service_canopen_ids
boost::shared_ptr< controller_manager::ControllerManager > m_controller_manager
ros::Publisher m_current_pub
std::string m_traj_controller_name
ros::ServiceServer m_home_service_joint_names
ros::NodeHandle m_pub_nh
ros::NodeHandle m_priv_nh
boost::thread m_traj_thread


schunk_canopen_driver
Author(s): Felix Mauch , Georg Heppner
autogenerated on Mon Jun 10 2019 15:07:49