/home/joel/ros_workspace/lar3/perception/parking_detection/src/pub_transformations.cpp

Go to the documentation of this file.
00001 
00007 #include <ros/ros.h>
00008 #include <tf/transform_broadcaster.h>
00009 #include <std_msgs/Float64.h>
00010 #include <math.h>
00011 
00017 int main(int argc, char** argv){
00018         ros::init(argc, argv, "pub_transformations");
00019         ros::NodeHandle n;
00020         tf::TransformBroadcaster broadcaster;
00021         ros::Rate r(10);
00022         
00023     float alpha=(38.5)*(M_PI/180);// 38.5 is obtained by multiplying the tillt angle by -1
00024         
00025         tf::Transform transform(btMatrix3x3(0,-1,0, cos(alpha),0,sin(alpha), -sin(alpha),0,cos(alpha)),
00026                                                         btVector3(0.236, -0.05, 0.68));
00027 
00028 
00029         ros::spinOnce();
00030         while(n.ok())
00031         {
00032           broadcaster.sendTransform(tf::StampedTransform(transform, ros::Time::now(),"/vehicle_odometry", "/openni_camera")); 
00033 
00034           r.sleep();
00035           ros::spinOnce();
00036         }
00037 }
 All Files Functions Variables Defines


parking_detection
Author(s): joel
autogenerated on Thu Jul 26 2012 21:39:08