如何接收RVIZ中的2D Pose Estimate 和2D Nav Goal

转载自:https://www.cnblogs.com/fuhang/p/12105561.html

如何接收RVIZ中的2D Pose Estimate 和2D Nav Goal

复制代码

#include "ros/ros.h"
#include "std_msgs/String.h"
#include 
#include 
#include 

void chatterCallback(const geometry_msgs::PoseWithCovarianceStamped::ConstPtr& msg)
{
  double x=msg->pose.pose.position.y;
  double y=msg->pose.pose.position.x;
  //double theta=msg->pose.pose.orientation;
  std::cout<point.x;
  double y=msg->point.y;
  //double theta=msg->pose.pose.orientation;
  std::cout< 
  

复制代码

你可能感兴趣的:(ROS,无人机-SLAM-仿真(总),无人机-a-个人笔记)