Closed moooeeeep closed 3 months ago
I'll be honest, Foxy is so ancient and so many thousands of things have changed since then, I won't even speculate as to why a break from Foxy to Humble occurred. Foxy is legit so out of date that we stopped supporting it years before it went EOL since the project moved past ABI/API stable updates so rapidly. Things have slowed down now so its not nearly as bad, but just important context.
But, I did test
ros2 launch nav2_bringup navigation_launch.py
and that seems to work fine for me with humble binaries. Can you test as well and let me know what you see? Perhaps this is an XML launch bug, but too early for me to point to that as the likely culrpit
On its own, I can run the launch file just fine. Embedding it into another (non-trivial) launch file, seems to break something sometimes.
Same behavior as described above (crash with [Errno 2] No such file or directory: ''
) occurs when called from the equivalent Python parent launch file:
from launch_ros.substitutions import FindPackageShare
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import PathJoinSubstitution, TextSubstitution
def generate_launch_description():
turtlebot3_world = IncludeLaunchDescription(
PythonLaunchDescriptionSource([
PathJoinSubstitution([
FindPackageShare('turtlebot3_gazebo'),
'launch/turtlebot3_world.launch.py'
])
]),
)
mapping = IncludeLaunchDescription(
PythonLaunchDescriptionSource([
PathJoinSubstitution([
FindPackageShare('rtabmap_demos'),
'launch/turtlebot3_scan.launch.py'
])
]),
)
navigation = IncludeLaunchDescription(
PythonLaunchDescriptionSource([
PathJoinSubstitution([
FindPackageShare('nav2_bringup'),
'launch/navigation_launch.py'
])
]),
launch_arguments={
'use_sim_time': 'True',
}.items()
)
return LaunchDescription([
turtlebot3_world,
mapping,
navigation,
])
When I explicitly pass the params_file
argument to navigation_launch.py
, it works:
'params_file': PathJoinSubstitution([
FindPackageShare('nav2_bringup'),
'params/nav2_params.yaml'
]),
I won't argue that this is a problem, but also wouldn't you need to pass in a configuration file no matter what? The defaults for every navigation server is not likely to work well for anyone's particular situation. Happy to have you dig into the problem and try to get it resolved, but also seems like a somewhat non-issue practically speaking
I agree that most serious users will probably override these parameters, but e.g., for getting started or quick tests the default config works just fine.
I just found this other post that seems to indicate this is indeed a more general issue, maybe a regression with ros2 launch. I'll try to reproduce this with a more minimal setup and consider to file an issue there instead.
Thanks for your input!
FWIW: Appparantly this is a "feature". Included launch files are not scoped by default. To isolate them from external modifications to default arguments, we need to wrap them into group actions.
Bug report
Required Info:
Steps to reproduce issue
Install deps
Prepare env
Run this launch file:
Expected behavior
Gazebo Turtlebot3 Simulation, RTAB-Map SLAM and nav2 Navigation Stack is started.
Actual behavior
Gazebo and RTAB-Map GUI open, but full stack crashes.
Text output:
Additional information
The same launch file works without changes as expected on foxy.
If we adjust the launch file slightly to specify the
params_file
argument, it launches as expected with humble (not tested with foxy though):I have made a post about this here: https://robotics.stackexchange.com/questions/109897