How to launch rosbag play from command line with remapaping specified in xml? [closed]

asked 2018-03-16 17:16:14 -0500

sg gravatar image

Existing file rb.launch invokes rosbag play as follows:

cat rb.launch:

    <launch>
      <arg name="bagfile" default="" />
      <arg name="s" default="0"/>

      <node name="$(anon rosbag)" pkg="rosbag" type="play" args="--clock --pause -s $(arg s) $(arg bagfile)" output="screen" >
        <remap from="/a/b" to="/x/a/b" />
        <remap from="/p/q" to="/x/p/q" />
      </node>
    </launch>

Would like to factor out the remapping of topics in file rb.launch into file myremap.xml, and use this xml file as command line input to rosbag play

cat myremap.xml:

<remap from="/a/b" to="/x/a/b" />
<remap from="/p/q" to="/x/p/q" />

Create rb_new.launch to replace rb.launch:

cat rb_new.lauanch:

<launch>
  <arg name="bagfile" default="" />
  <arg name="s" default="0"/>

  <node name="$(anon rosbag)" pkg="rosbag" type="play" args="--clock --pause -s $(arg s) $(arg bagfile)" output="screen" >
    <include file="$(find the_proj)/remapper/myremap,xml"/>
  </node>
</launch>

Questions:

1) Is the above syntax correct for rb_new.launch to replace rb.launch?

2) What's the syntax for the command line use of myremap.xml?:

***Incorrect*:**  roslaunch pkg:rosbag type:=play args:="--clock --pause -s <s_valaue> <bagfile_value>" include:=`catkin locate the_proj`/remapper/myremap,xml
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2019-04-08 00:33:11.103744