-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtfecho.cpp
More file actions
38 lines (28 loc) · 788 Bytes
/
tfecho.cpp
File metadata and controls
38 lines (28 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "ros/ros.h"
#include "std_msgs/String.h"
#include "../include/base_realsense_node.h"
#include <ros/ros.h>
#include <tf/transform_broadcaster.h>
#include <nav_msgs/Odometry.h>
/**
* This tutorial demonstrates simple receipt of messages over the ROS system.
*/
// %Tag(CALLBACK)%
void chatterCallback(const std_msgs/Header header )
{
cout << endl;
}
// %EndTag(CALLBACK)%
int main(int argc, char **argv)
{
ros::init(argc, argv, "listener");
ros::NodeHandle n;
ROS_INFO("OK,up");
cout << 333 << endl;
//ros::Subscriber sub = n.subscribe("/rtabmap/odom", 1000, chatterCallback);
ros::Subscriber robot = n.subscribe<std_msgs/Header header>("/rtabmap/odom", 1000 , chatterCallback);
//cout << sub <<endl;
ros::spin();
return 0;
}
// %EndTag(FULLTEXT)%