armadillo2_hw.cpp
Go to the documentation of this file.
1 
2 #include "armadillo2_hw.h"
3 
4 namespace armadillo2_hw
5 {
6 
8  dxl_motors_(nh), battery_(nh), ric_(nh), roboteq_(nh)
9  {
10  node_handle_ = &nh;
11 
12  /* register handles */
20 
21  /* register interfaces */
27 
29 
30  ric_.startLoop();
31 
32  ROS_INFO("[armadillo2_hw]: armadillo hardware interface loaded successfully");
33  espeak_pub_ = node_handle_->advertise<std_msgs::String>("/espeak_node/speak_line", 10);
34  speakMsg("i am ready", 1);
35  }
36 
38  {
40  dxl_motors_.read();
41  roboteq_.read(period);
42  ric_.read(period);
43  }
44 
46  {
49  roboteq_.write(period);
50  ric_.write(period);
52  }
53 }
void registerHandles(hardware_interface::JointStateInterface &joint_state_interface, hardware_interface::PositionJointInterface &position_interface, hardware_interface::PosVelJointInterface &posvel_interface)
ArmadilloHW(ros::NodeHandle &nh)
void registerHandles(hardware_interface::JointStateInterface &joint_state_interface, hardware_interface::VelocityJointInterface &velocity_joint_interface)
hardware_interface::VelocityJointInterface velocity_interface_
Definition: armadillo2_hw.h:29
ros::Publisher espeak_pub_
Definition: armadillo2_hw.h:38
void startLoop()
hardware_interface::PosVelJointInterface posvel_interface_
Definition: armadillo2_hw.h:28
void read(const ros::Duration elapsed)
hardware_interface::JointStateInterface joint_state_interface_
Definition: armadillo2_hw.h:26
#define ROS_INFO(...)
RoboteqDiffDrive roboteq_
Definition: armadillo2_hw.h:36
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
void write(const ros::Duration elapsed)
DxlMotorsBuilder dxl_motors_
Definition: armadillo2_hw.h:33
void read(const ros::Duration elapsed)
hardware_interface::PositionJointInterface position_interface_
Definition: armadillo2_hw.h:27
void write(const ros::Duration elapsed)
static Time now()
hardware_interface::EffortJointInterface effort_interface_
Definition: armadillo2_hw.h:30
ros::NodeHandle * node_handle_
Definition: armadillo2_hw.h:23
void registerHandles(hardware_interface::JointStateInterface &joint_state_interface, hardware_interface::EffortJointInterface &position_interface)
void speakMsg(std::string msg, int sleep_time)
Definition: armadillo2_hw.h:42


armadillo2_hw
Author(s):
autogenerated on Wed Jan 3 2018 03:48:27