You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Building with catkin_tools, debugging a test by launching a .test file only works after building the tested package twice, the second time after sourcing devel/setup.bash.
Repro steps
Checkout this minimum example and open it with vscode. Reopen in devcontainer.
Ensure the workspace is clean (catkin clean -y) and open a new terminal to ensure nothing is sourced.
Run source /opt/ros/noetic/setup.bash then catkin build foo. You can now run and debug the "foo_node" launch configuration (expected to work, just for cross check with regular launch files).
Run catkin test foo that should pass. You should now be able to run and debug the "foo_test" launch configuration. Yet doing so you get an error dialog box à la Command failed: roslaunch --args /foo_test /workspace/src/foo/test/foo_test.test (see full text below).
Run source devel/setup.bash then catkin build fooagain. Now you can run and debug the "foo_test" launch configuration.
expected behavior
Step 4. should already work. Running catkin build foo a second time, even after sourcing devel/setup.bash, should be a no-op.
additional context
How I found out catkin build foo a second time might solve the problem
After you clean your catkin workspace, of course you have to build your catkin folder and source this workspace. But you also have to build your catkin workspace a second time, which I forgot to do.
Full error dialog box
[Window Title]
Visual Studio Code
[Content]
Command failed: roslaunch --args /foo_test /workspace/src/foo/test/foo_test.test
Traceback (most recent call last):
File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/__init__.py", line 268, in main
node_args.print_node_args(options.node_args, args)
File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/node_args.py", line 108, in print_node_args
args = get_node_args(node_name, roslaunch_files)
File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/node_args.py", line 194, in get_node_args
args = create_local_process_args(node, machine)
File "/opt/ros/noetic/lib/python3/dist-packages/roslaunch/node_args.py", line 269, in create_local_process_args
raise NodeParamsException("Cannot locate node of type [%s] in package [%s]. Make sure file exists in package path and permission is set to executable (chmod +x)"%(node.type, node.package))
roslaunch.node_args.NodeParamsException: Cannot locate node of type [foo_test] in package [foo]. Make sure file exists in package path and permission is set to executable (chmod +x)
[Open 'launch.json'] [Cancel]
The text was updated successfully, but these errors were encountered:
v0.9.2
Version: 1.83.0 (user setup)
Commit: e7e037083ff4455cf320e344325dacb480062c3c
Date: 2023-10-03T16:12:16.321Z
Electron: 25.8.4
ElectronBuildId: 24154031
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Windows_NT x64 10.0.22621
what is the bug
Building with catkin_tools, debugging a test by launching a .test file only works after building the tested package twice, the second time after sourcing
devel/setup.bash
.Repro steps
catkin clean -y
) and open a new terminal to ensure nothing is sourced.source /opt/ros/noetic/setup.bash
thencatkin build foo
. You can now run and debug the "foo_node" launch configuration (expected to work, just for cross check with regular launch files).catkin test foo
that should pass. You should now be able to run and debug the "foo_test" launch configuration. Yet doing so you get an error dialog box à laCommand failed: roslaunch --args /foo_test /workspace/src/foo/test/foo_test.test
(see full text below).source devel/setup.bash
thencatkin build foo
again. Now you can run and debug the "foo_test" launch configuration.expected behavior
Step 4. should already work. Running
catkin build foo
a second time, even after sourcingdevel/setup.bash
, should be a no-op.additional context
How I found out
catkin build foo
a second time might solve the problemWhy does catkin run_tests run without a error but rostest not? states
Full error dialog box
The text was updated successfully, but these errors were encountered: