1、问题背景

     数据发送端数据检测正常;rviz端能正确接收到nav_msgs::Path消息对应的topic,且状态显示OK,而且消息计数也在增加,

但就是不显示轨迹。


2、问题原因

   nav_msgs::Path      path_msg;

   变量的定义在发送topic的函数内部,不是全局变量,意味着每次发送path_msg时都新建了一个nav_msgs::Path消息。


3、解决办法

    nav_msgs::Path      path_msg;

     将上述变量移到函数之外,编程全局变量.



4、rostopic echo xxx

    有问题时的topic



没有问题时看到的topic格式:





标签: none

评论已关闭