Robotics StackExchange | Archived questions

[ROS2] Not able to use $(env <NAME> <DEFAULT>) in launch file

I'm in ROS2 Dashing.

Is this already available? I tried it but when I run the launch file, it still can't run.

My launch file looks like

return launch.LaunchDescription([
    launch.actions.DeclareLaunchArgument(
        name='model',
        default_value='$(env TURTLEBOT3_MODEL burger)'
    ),

and I got this error

[ERROR] [launch]: Caught exception in launch (see debug for traceback): 'TURTLEBOT3_MODEL'

According to https://index.ros.org/doc/ros2/Tutorials/Launch-files-migration-guide/#substitutions, it's available but I can't get it working

Asked by ahtsan on 2020-07-27 17:39:11 UTC

Comments

Answers