tf_remapper_node.h
Go to the documentation of this file.
1 #ifndef TF_REMAPPER_NODE_CPP_TF_REMAPPER_H
2 #define TF_REMAPPER_NODE_CPP_TF_REMAPPER_H
3 
4 #include <ros/ros.h>
5 #include <tf2_msgs/TFMessage.h>
6 #include <ros/message.h>
7 
9 
10 namespace tf_remapper_cpp {
11 
24 public:
28 
29  virtual ~TfRemapperNode() {};
30 
31 protected:
32  ros::NodeHandle publicNodeHandle;
33  ros::NodeHandle privateNodeHandle;
34  ros::Subscriber oldTfSubscriber;
35  ros::Subscriber remappedTfSubscriber;
36  ros::Publisher remappedTfPublisher;
37  ros::Publisher oldTfPublisher;
38 
39  bool staticTf;
40  tf2_msgs::TFMessage staticTfCache;
41  tf2_msgs::TFMessage reverseStaticTfCache;
42 
43  std::string oldTfTopic;
44  std::string remappedTfTopic;
45 
48 
51  void oldTfCallback(const ros::MessageEvent<tf2_msgs::TFMessage const>& event);
52 
55  void remappedTfCallback(const ros::MessageEvent<tf2_msgs::TFMessage const>& event);
56 
60  void addToStaticTfCache(const tf2_msgs::TFMessage& message, tf2_msgs::TFMessage& cache) const;
61 };
62 
63 };
64 
65 #endif //TF_REMAPPER_NODE_CPP_TF_REMAPPER_H
TfRemapper reverseTfRemapper
The remapper that actually changes the TF messages.
TfRemapper tfRemapper
Name of the remapped topic ("/tf").
Remap frames in TF messages according to given rules.
Definition: tf_remapper.h:10
tf2_msgs::TFMessage staticTfCache
If true, this node works with static TF, which need special care.
ros::Publisher oldTfPublisher
Publisher of /tf.
A node that remaps TF frame names according to the given set of rules.
ros::Subscriber remappedTfSubscriber
Subscriber to /tf_old.
ros::NodeHandle privateNodeHandle
ROS node handle.
tf2_msgs::TFMessage reverseStaticTfCache
Cache of static TF messages.
std::string remappedTfTopic
Name of the old topic ("/tf_old").
ros::Publisher remappedTfPublisher
Subscriber to /tf (only in bidirectional mode).
void oldTfCallback(const ros::MessageEvent< tf2_msgs::TFMessage const > &event)
The remapper that actually changes the TF messages in reverse direction.
ros::Subscriber oldTfSubscriber
Private ROS node handle.
void remappedTfCallback(const ros::MessageEvent< tf2_msgs::TFMessage const > &event)
Callback when a TF message arrives on the remapped TF topic.
bool staticTf
Publisher of /tf_old (only in bidirectional mode).
void addToStaticTfCache(const tf2_msgs::TFMessage &message, tf2_msgs::TFMessage &cache) const
Add the given TF message to the static TF cache. Newer TFs overwrite the older ones.
std::string oldTfTopic
Cache of static TF messages in the reverse direction.


tf_remapper_cpp
Author(s): Martin Pecka
autogenerated on Thu Sep 6 2018 13:56:55