Quori.hpp
Go to the documentation of this file.
1 #pragma once
2 
6 
7 #include <geometry_msgs/Vector3.h>
8 #include <std_msgs/Float32.h>
9 
10 #include "SerialDevice.hpp"
11 #include "Joint.hpp"
12 
13 #include "message.hpp"
14 
15 #include <map>
16 #include <unordered_map>
17 
18 #include <vector>
19 #include <boost/optional.hpp>
20 
21 #include <ros/time.h>
22 
23 namespace quori_controller
24 {
26  {
27  public:
28  Quori(ros::NodeHandle &nh, const std::vector<SerialDevice::Ptr> &devices);
29  ~Quori();
30 
31  virtual void read(const ros::Time &time, const ros::Duration &period);
32  void write();
33  virtual void write(const ros::Time &time, const ros::Duration &period);
34 
35  private:
36  void on_base_vel_status_(const geometry_msgs::Vector3::ConstPtr &msg);
37  void on_base_turret_pos_(const std_msgs::Float32::ConstPtr &msg);
38 
39 
40 
47 
48  std::vector<SerialDevice::Ptr> devices_;
49  std::map<SerialDevice::Ptr, quori::message::States> device_states_;
50 
54 
55  std::map<SerialDevice::Ptr, std::vector<std::size_t>> device_joints_;
56  std::size_t max_device_joints_;
58 
59  float base_offset_;
60 
61 
62  std::unordered_map<std::string, std::size_t> joint_indices_;
63  std::vector<Joint::Ptr> joints_;
64 
68 
73 
74  boost::optional<geometry_msgs::Vector3::ConstPtr> base_vel_;
75 
77  };
78 }
79 
quori_controller::Quori::state_interface_
hardware_interface::JointStateInterface state_interface_
Definition: Quori.hpp:51
quori_controller::Quori::max_device_joints_
std::size_t max_device_joints_
Definition: Quori.hpp:56
ros::Publisher
quori_controller::Quori::base_mode_
Joint::Ptr base_mode_
Definition: Quori.hpp:72
quori_controller::Quori::base_right_
Joint::Ptr base_right_
Definition: Quori.hpp:67
message.hpp
hardware_interface::JointStateInterface
time.h
quori_controller::Quori::last_read_
ros::Time last_read_
Definition: Quori.hpp:76
quori_controller::Quori::base_vel_
boost::optional< geometry_msgs::Vector3::ConstPtr > base_vel_
Definition: Quori.hpp:74
quori_controller::Quori::read
virtual void read(const ros::Time &time, const ros::Duration &period)
Definition: Quori.cpp:165
quori_controller
Definition: Csv.hpp:10
Joint.hpp
hardware_interface::VelocityJointInterface
quori_controller::Quori::on_base_vel_status_
void on_base_vel_status_(const geometry_msgs::Vector3::ConstPtr &msg)
Definition: Quori.cpp:246
quori_controller::Quori::base_y_
Joint::Ptr base_y_
Definition: Quori.hpp:70
joint_command_interface.h
hardware_interface::RobotHW
quori_controller::Quori::base_turret_
Joint::Ptr base_turret_
Definition: Quori.hpp:65
quori_controller::Quori::nh_
ros::NodeHandle & nh_
Definition: Quori.hpp:41
quori_controller::Quori::base_left_
Joint::Ptr base_left_
Definition: Quori.hpp:66
quori_controller::Quori::joints_
std::vector< Joint::Ptr > joints_
Definition: Quori.hpp:63
quori_controller::Quori::~Quori
~Quori()
Definition: Quori.cpp:160
quori_controller::Quori::devices_
std::vector< SerialDevice::Ptr > devices_
Definition: Quori.hpp:48
quori_controller::Quori::position_interface_
hardware_interface::PositionJointInterface position_interface_
Definition: Quori.hpp:52
quori_controller::Quori::base_vel_pub_
ros::Publisher base_vel_pub_
Definition: Quori.hpp:42
quori_controller::Quori::device_states_
std::map< SerialDevice::Ptr, quori::message::States > device_states_
Definition: Quori.hpp:49
quori_controller::Quori::joint_indices_
std::unordered_map< std::string, std::size_t > joint_indices_
Definition: Quori.hpp:62
joint_state_interface.h
quori_controller::Quori::device_joints_
std::map< SerialDevice::Ptr, std::vector< std::size_t > > device_joints_
Definition: Quori.hpp:55
quori_controller::Quori::on_base_turret_pos_
void on_base_turret_pos_(const std_msgs::Float32::ConstPtr &msg)
Definition: Quori.cpp:251
ros::Time
quori_controller::Quori::Quori
Quori(ros::NodeHandle &nh, const std::vector< SerialDevice::Ptr > &devices)
Definition: Quori.cpp:17
quori_controller::Quori::base_angle_
Joint::Ptr base_angle_
Definition: Quori.hpp:71
quori_controller::Quori::base_offset_pub_
ros::Publisher base_offset_pub_
Definition: Quori.hpp:44
robot_hw.h
quori_controller::Joint::Ptr
std::shared_ptr< Joint > Ptr
Definition: Joint.hpp:15
quori_controller::Quori::device_joint_buffer_
double * device_joint_buffer_
Definition: Quori.hpp:57
SerialDevice.hpp
quori_controller::Quori::base_holo_vel_pub_
ros::Publisher base_holo_vel_pub_
Definition: Quori.hpp:43
quori_controller::Quori::base_turret_pos_
ros::Subscriber base_turret_pos_
Definition: Quori.hpp:46
quori_controller::Quori::write
void write()
hardware_interface::PositionJointInterface
quori_controller::Quori::base_vel_status_
ros::Subscriber base_vel_status_
Definition: Quori.hpp:45
ros::Duration
quori_controller::Quori::base_offset_
float base_offset_
Definition: Quori.hpp:59
ros::NodeHandle
ros::Subscriber
quori_controller::Quori
Definition: Quori.hpp:25
quori_controller::Quori::base_x_
Joint::Ptr base_x_
Definition: Quori.hpp:69
quori_controller::Quori::velocity_interface_
hardware_interface::VelocityJointInterface velocity_interface_
Definition: Quori.hpp:53


quori_controller
Author(s):
autogenerated on Wed Mar 2 2022 00:53:16