Header file for different ROS message type. More...
#include <ros/ros.h>#include <sensor_msgs/Imu.h>#include <geometry_msgs/Twist.h>#include <std_msgs/String.h>

Go to the source code of this file.
Macros | |
| #define | MSG_CLASS1 sensor_msgs::Imu |
| #define | MSG_CLASS2 geometry_msgs::Twist |
| #define | MSG_CLASS3 std_msgs::String |
| #define | MSG_TYPE1 "sensor_msgs/Imu" |
| #define | MSG_TYPE2 "geometry_msgs/Twist" |
| #define | MSG_TYPE3 "std_msgs/String" |
| #define | SUB_MAX 50 |
Functions | |
| template<typename T > | |
| void | deserialize_pub (uint8_t *buffer_ptr, size_t msg_size, int i) |
| void | deserialize_publish (uint8_t *buffer_ptr, size_t msg_size, std::string msg_type, int i) |
| template<typename T > | |
| ros::Subscriber | nh_sub (std::string topic_name, ros::NodeHandle nh, int i) |
| template<typename T , int i> | |
| void | sub_cb (const T &msg) |
| ros::Publisher | topic_publisher (std::string topic_name, std::string msg_type, ros::NodeHandle nh) |
| ros::Subscriber | topic_subscriber (std::string topic_name, std::string msg_type, ros::NodeHandle nh, int i) |
Variables | |
| template<typename T > | |
| void(* | sub_callbacks [])(const T &) |
Header file for different ROS message type.
Note: the sub_cb() and deserialize_pub() are only declared here, you should define them in you .cpp file according to your need.
BSD 3-Clause License
Definition in file ros_sub_pub.hpp.
| #define MSG_CLASS1 sensor_msgs::Imu |
Definition at line 28 of file ros_sub_pub.hpp.
| #define MSG_CLASS2 geometry_msgs::Twist |
Definition at line 32 of file ros_sub_pub.hpp.
| #define MSG_CLASS3 std_msgs::String |
Definition at line 36 of file ros_sub_pub.hpp.
| #define MSG_TYPE1 "sensor_msgs/Imu" |
Definition at line 27 of file ros_sub_pub.hpp.
| #define MSG_TYPE2 "geometry_msgs/Twist" |
Definition at line 31 of file ros_sub_pub.hpp.
| #define MSG_TYPE3 "std_msgs/String" |
Definition at line 35 of file ros_sub_pub.hpp.
| #define SUB_MAX 50 |
Definition at line 48 of file ros_sub_pub.hpp.
| void deserialize_pub | ( | uint8_t * | buffer_ptr, |
| size_t | msg_size, | ||
| int | i | ||
| ) |
Definition at line 100 of file bridge_node.cpp.
| void deserialize_publish | ( | uint8_t * | buffer_ptr, |
| size_t | msg_size, | ||
| std::string | msg_type, | ||
| int | i | ||
| ) |
Definition at line 182 of file ros_sub_pub.hpp.
| ros::Subscriber nh_sub | ( | std::string | topic_name, |
| ros::NodeHandle | nh, | ||
| int | i | ||
| ) |
Definition at line 85 of file ros_sub_pub.hpp.
| void sub_cb | ( | const T & | msg | ) |
Definition at line 65 of file bridge_node.cpp.
| ros::Publisher topic_publisher | ( | std::string | topic_name, |
| std::string | msg_type, | ||
| ros::NodeHandle | nh | ||
| ) |
Definition at line 136 of file ros_sub_pub.hpp.
| ros::Subscriber topic_subscriber | ( | std::string | topic_name, |
| std::string | msg_type, | ||
| ros::NodeHandle | nh, | ||
| int | i | ||
| ) |
Definition at line 90 of file ros_sub_pub.hpp.
| void(* sub_callbacks[])(const T &) |
Definition at line 54 of file ros_sub_pub.hpp.