Remapping topics of included launch files
Hi! I am trying to write a launch file where I include another launch file. Additionally, I want to remap topics that are "created" within the included launch file. I want to refrain from changing the included launch file. Here is, how I am doing this so far:
<launch>
<group>
<remap from="remapped_topic_in_rosbag" to="rosbag_remap_outside" />
<remap from="rostopic_remap" to="rostopic_remap_outside" />
<include file="/home/user/Desktop/test_remap.launch">
</include>
</group>
</launch>
where test_remap.launch looks like this:
<launch>
<node pkg="rostopic" type="rostopic" name="testpub" args="pub /topic_name std_msgs/String hello">
<remap from="topic_name" to="rostopic_remap" />
</node>
<node pkg="rosbag" type="play" name="rosbag_play" required="true" args="
--clock
--bags the_bag_file >
<remap from=topic_within_the_bag_file to="remapped_topic_in_rosbag" />
</node>
</launch>
The result is, that rostopic_remap_outside and remapped_topic_in_rosbag are published (note: not rosbag_remap_outside!). There seems to be a difference in the two remapping arguments within test_remap.launch.
Does anybody know why? What is best practice to remap topics coming from an included launch file? Thanks, JayDe