Go to the documentation of this file.00001 #include <ros/ros.h>
00002 #include <tf/transform_broadcaster.h>
00003 #include <std_msgs/Float64.h>
00004 #include <math.h>
00005 tf::TransformBroadcaster* p_broadcaster;
00006
00014 int main(int argc, char** argv)
00015 {
00016 ros::init(argc, argv, "tf_generator_node");
00017 ros::NodeHandle n;
00018 tf::TransformBroadcaster broadcaster;
00019 p_broadcaster=& broadcaster;
00020 ros::Rate r(10);
00021
00022
00023 tf::Transform transform1(btMatrix3x3(1,0,0, 0,1,0, 0,0,1),
00024 btVector3(0, 0, 0.10));
00025 double theta=0;
00026 int inc=0;
00027 while(n.ok())
00028 {
00029 theta=inc*(2*M_PI)/1000;
00030
00031
00032 p_broadcaster->sendTransform(tf::StampedTransform(transform1, ros::Time::now(),"/vehicle_odometry", "/tracking_frame1"));
00033 r.sleep();
00034 ros::spinOnce();
00035
00036 }
00037 }