I am using ROS extension for VS Code and I have organized my launch files based on Roslaunch tips for large projects. I have 2 main launch files, one that I launch from the linux terminal, and one via the launch.json in VS Code (both shown below).
Launched in VS code: master_rag_simulation.launch:
<launch>
<!-- launch Gazbeo with multiple robots -->
<include file="$(find turtlebot3_slam)/launch/multi_karto_gtsam_posfilter.launch"/>
<include file="$(find resource_aware_coordination)/launch/multi_local_comm_nodes.launch"/>
</launch>
Launched from terminal: master_rag_sim_terminal.launch:
<launch>
<!-- launch Gazbeo with multiple robots -->
<include file="$(find turtlebot3_gazebo)/launch/multi_MAIN_turtlebot3_testzone.launch"/>
<!-- multirobot laser scanner filter on each robot -->
<include file="$(find turtlebot3_slam)/launch/multi_posfilter.launch"/>
<!-- launch move_base for each robot -->
<include file="$(find turtlebot3_navigation)/launch/multi_move_base.launch"/>
<!-- launch frontier point exploration nodes on each robot's local OGM -->
<include file="$(find resource_aware_coordination)/launch/exploration_frontier_points.launch"/>
</launch>
When I launch this file, particularly the "multi_karto_gtsam_posfilter.launch" file, I get the following error from VS code:
"Error from roslaunch: WARN: unrecognized 'remap' tag in tag"
This is what my multi_karto_gtsam_posfilter.launch file looks like:
<launch>
<arg name="open_rviz" default="true"/>
<param name="/use_sim_time" value="true"/>
<arg name="output_to_screen" default="screen"/> <!-- New argument for output option -->
<!-- Launch the gmapping node for Turtlebot 3 with custom namespace -->
<!-- <group ns="tb3_0"> -->
<include file="$(find turtlebot3_slam)/launch/turtlebot3_karto_gtsam.launch">
<!-- <arg name="output_to_screen" value="log"/> -->
<arg name="output_to_screen" value="screen"/>
<arg name="ns" value="tb3_0"/>
<remap from="/$(arg ns)/scan" to="/$(arg ns)/scan_filtered"/>
</include>
<!-- <group ns="tb3_1"> -->
<include file="$(find turtlebot3_slam)/launch/turtlebot3_karto_gtsam.launch">
<arg name="output_to_screen" value="log"/>
<arg name="ns" value="tb3_1"/>
<remap from="/$(arg ns)/scan" to="/$(arg ns)/scan_filtered"/>
</include>
<!-- <group ns="tb3_2"> -->
<include file="$(find turtlebot3_slam)/launch/turtlebot3_karto_gtsam.launch">
<arg name="output_to_screen" value="log"/>
<arg name="ns" value="tb3_2"/>
<remap from="/$(arg ns)/scan" to="/$(arg ns)/scan_filtered"/>
</include>
<include file="$(find turtlebot3_gazebo)/launch/multi_map_merge_karto.launch"></include>
<group if="$(arg open_rviz)">
<node pkg="rviz" type="rviz" name="rviz" required="true"
args="-d $(find turtlebot3_gazebo)/rviz/multi_turtlebot3_slam_withpathspose.rviz"/>
</group>
</launch>
What can I do to fix this error so I can continue debugging in VS Code? I see that this error originates from tools/roslaunch/src/roslaunch/xmlloader.py, line 583. When I run the launch files from my terminal, they work correctly with no errors.