Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Remapping is ignored on both ROS1 and ROS2 #1150

Open
2 tasks
sandilyasg opened this issue Sep 27, 2023 · 5 comments
Open
2 tasks

[bug] Remapping is ignored on both ROS1 and ROS2 #1150

sandilyasg opened this issue Sep 27, 2023 · 5 comments
Labels
bug Something isn't working Debugging launch Bugs and features related to launch files ROS1 ROS2

Comments

@sandilyasg
Copy link

sandilyasg commented Sep 27, 2023

(Please add appropriate labels)

  • Linux: (Ubuntu 18.04)
  • ROS 1: Melodic

<Version of the plugin>
v0.8.4

<Copy the Version information from the Help | About menu>
Version: 1.82.2
Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d
Date: 2023-09-14T05:51:20.981Z
Electron: 25.8.1
ElectronBuildId: 23779380
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Linux x64 5.4.0-150-generic snap

what is the bug

<current behavior>
I get the following error from VS code debugger: "Error from roslaunch: WARN: unrecognized 'remap' tag in tag"

Repro steps

<how to reproduce the bug. Please attach sample files or github repo if appropriate.>

  1. 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:
    `

`

Launched from terminal: master_rag_sim_terminal.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:
`

<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>
<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>
<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>

`

expected behavior

<what you would expect to happen>
I expect to see no error or warning, and the debugger steps through breakpoints in the C++ nodes.

additional context

<any additional information would be helpful for a better understanding>
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.

@sandilyasg sandilyasg added the bug Something isn't working label Sep 27, 2023
@xoofee
Copy link

xoofee commented Oct 10, 2023

I met the same problem with python launch file. Ros extension in VSCODE ignore the remappings in launch.py when start debuging

If run command in terminal, it has no problem

@sandilyasg
Copy link
Author

@xoofee what do you mean Python launch file? As in you have a .launch file which includes a python node? Yes if run from the terminal, this remapping problem does not occur. Would be nice to get it to work in VS code ROS extension

@xoofee
Copy link

xoofee commented Oct 10, 2023

yes, I mean xxx.launch.py file in python format, this is an example

`from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():
return LaunchDescription([
Node(
package='ros_test',
namespace='',
executable='ros_test_node',
remappings=[
('~/input', '/localization/kinematic_state'),
]
),
])
`

However, if I do not use the tilde ~/ in my topic name, just 'input', the VS code ROS extension has no problem for the remap.

@sandilyasg
Copy link
Author

@xoofee thanks for your reply. Where do I find this .launch.py file, is it generated for any .launch file that I have or did you specifically create it yourself for use with VSCode ROS extension?

@ooeygui
Copy link
Member

ooeygui commented Jan 8, 2024

Just to confirm -This looks like it repros on both ROS1 and ROS2?

@ooeygui ooeygui changed the title [bug] Debugger unrecognized remap tag in <include> tag [bug] Remapping is ignored on both ROS1 and ROS2 Jan 8, 2024
@ooeygui ooeygui added ROS1 ROS2 launch Bugs and features related to launch files Debugging labels Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Debugging launch Bugs and features related to launch files ROS1 ROS2
Projects
None yet
Development

No branches or pull requests

3 participants