utils.h
Go to the documentation of this file.
1 #ifndef __SLAM_FMWK_ROS_UTILS_H
2 #define __SLAM_FMWK_ROS_UTILS_H
3 
4 #include <string>
6 #include <ros/ros.h>
7 
8 
9 inline void publish_2D_transform(const std::string &target_frame,
10  const std::string &base_frame,
11  const RobotPose& pose) {
12 
13  tf::Vector3 translation(pose.x, pose.y, 0);
14  tf::Quaternion rotation;
15  rotation.setRPY(0, 0, pose.theta);
16 
17  tf::Transform tr(rotation, translation);
18  tf::StampedTransform st_trans(tr, ros::Time::now(), base_frame, target_frame);
19 
20  static tf::TransformBroadcaster br;
21  br.sendTransform(st_trans);
22 }
23 
24 #endif
double theta
Definition: robot_pose.h:131
void publish_2D_transform(const std::string &target_frame, const std::string &base_frame, const RobotPose &pose)
Definition: utils.h:9
void setRPY(const tfScalar &roll, const tfScalar &pitch, const tfScalar &yaw)
void sendTransform(const StampedTransform &transform)
double y
Definition: robot_pose.h:131
static Time now()
double x
Definition: robot_pose.h:131


slam_constructor
Author(s): JetBrains Research, OSLL team
autogenerated on Mon Jun 10 2019 15:08:25