fake_pose_estimation_nodelet.cpp
Go to the documentation of this file.
3 #include <geometry_msgs/PoseWithCovarianceStamped.h>
4 
6 
8 {
9  nh_ = getPrivateNodeHandle();
10  nh_ = getNodeHandle();
11 
12  pose_pub_ = nh_.advertise<geometry_msgs::PoseWithCovarianceStamped>("pose", 1);
13 
14  odom_sub_ = nh_.subscribe<nav_msgs::Odometry>("odom", 1, &FakePoseEstimationNodelet::odomCallback, this);
15 }
16 
17 void FakePoseEstimationNodelet::odomCallback(const nav_msgs::OdometryConstPtr& odom)
18 {
19  geometry_msgs::PoseWithCovarianceStamped pose;
20  pose.header = odom->header;
21  pose.pose.pose = odom->pose.pose;
22  pose.pose.covariance = odom->pose.covariance;
23 
24  pose_pub_.publish(pose);
25 }
void publish(const boost::shared_ptr< M > &message) const
void odomCallback(const nav_msgs::OdometryConstPtr &odom)
#define PLUGINLIB_EXPORT_CLASS(class_type, base_class_type)


tuw_multi_robot_ctrl
Author(s): Benjamin Binder
autogenerated on Mon Jun 10 2019 15:42:29