ROS重命名topic

1、rosbag  play filename.bag /foo:=/bar  foo是原始topic,bar是要变成的目标topic

2、在launch文件中更改,使用remap功能(remap的 ROS官方文档

<remap from="chatter" to="hello"/>

一个实用例子:

<launch>    
    <node pkg="test" type="talker" name="talker" output="screen">
    <!--talker节点发布的topic为/chatter-->
        <!--将talker节点发布的话题/chatter映射到/hello的名字上-->
        <remap from="/chatter" to="/hello" />        
    </node> 
</launch>

参考链接:

https://blog.csdn.net/ethan_guo/article/details/80262650

https://blog.csdn.net/u013453604/article/details/50381999

猜你喜欢

转载自blog.csdn.net/u012686154/article/details/85059265
今日推荐