melfa_hardware_interface.h
Go to the documentation of this file.
1 // Copyright 2018 Tokyo Opensource Robotics Kyokai Association (TORK)
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #include <unistd.h>
16 #include <sys/types.h>
17 #include <sys/socket.h>
18 #include <netinet/in.h>
19 #include <arpa/inet.h>
20 #include <ros/ros.h>
25 #include "melfa_driver/strdef.h"
26 
27 #define JOINT_NUM (8)
28 
29 
31 {
32 public:
33  MelfaHW (double period);
34  void update (void);
35  void write (void);
36  void read (void);
37  void write_first (void);
39 
41  {
42  return ros::Duration(period_);
43  }
44 private:
45  double period_;
48 
49  std::string robot_ip_;
50  int socket_;
51  struct sockaddr_in addr_;
52 
55  int counter_;
56 
57  // true if use joint7
59  // true if use joint8
61  // true if joint7 is linear joint
63  // true if joint8 is linear joint
65 
68 
69  double cmd[JOINT_NUM];
70  double pos[JOINT_NUM];
71  double vel[JOINT_NUM];
72  double eff[JOINT_NUM];
73 };
double pos[JOINT_NUM]
double cmd[JOINT_NUM]
double vel[JOINT_NUM]
hardware_interface::PositionJointInterface joint_pos_interface
void diagnose(diagnostic_updater::DiagnosticStatusWrapper &stat)
double eff[JOINT_NUM]
struct sockaddr_in addr_
MelfaHW(double period)
void update(void)
void write_first(void)
#define JOINT_NUM
ros::Duration getPeriod()
std::string robot_ip_
hardware_interface::JointStateInterface joint_state_interface


melfa_driver
Author(s): Ryosuke Tajima
autogenerated on Mon Jun 10 2019 14:04:51