Small Confusion about TF
if I have a broadcaster like this:
void pub_odom::odom_callback(const nav_msgs::Odometry& odom) {
btVector3 Position;
btQuaternion Orientation;
tf::TransformBroadcaster odom_broadcaster_;
tf::StampedTransform odom_transform;
Position.setValue(odom.pose.pose.position.x,odom.pose.pose.position.y,odom.pose.pose.position.z);
Orientation.setW(odom.pose.pose.orientation.w);
Orientation.setX(odom.pose.pose.orientation.x);
Orientation.setY(odom.pose.pose.orientation.y);
Orientation.setZ(odom.pose.pose.orientation.z);
odom_transform.setOrigin(map_center);
odom_transform.setRotation(tf::Quaternion(tf::Vector3(0,0,1),-yaw_init));
odom_transform.stamp_ = odom.header.stamp;
odom_transform.child_frame_id_= "/odom";
odom_transform.frame_id_= "/center_map";
odom_broadcaster_.sendTransform(odom_transform);}
How do I visualise its publication on rviz and tf. Do i have to create something like in my launch file in order to visualise it:
<node pkg="tf" type="static_transform_publisher" name="tf_data" args="1.0 0.0 0.0 0.0 1.0 0.0 /odom /another_link 20" />
WHen I do it with this launch file I can visualise in tf the tranformation between /odom and /another_link and the transformation is based on args I have given in launch file. How do I get the publication based on the broadcaster and the callback function.