ros-navigation / navigation2_tutorials

Tutorial code referenced in https://docs.nav2.org/
180 stars 124 forks source link

Error at startup display.launch.py: cannot import name 'Command' #49

Closed Exboom closed 2 years ago

Exboom commented 2 years ago

Hello! I'm using Jetson Nano(JP4.6) With ROS 2 Eloquent. I built Nav2 from the source code, made a test description of URDF, but could not run display.launch.py . Here is the output I see when trying to run:

robot@robothost:~$ ros2 launch vector_description display.launch.py
[INFO] [launch]: All log files can be found below /home/robot/.ros/log/2022-02-18-14-13-30-610366-robothost-18354
[INFO] [launch]: Default logging verbosity is set to INFO
[ERROR] [launch]: Caught exception in launch (see debug for traceback): Caught exception when trying to load file of format [py]: cannot import name 'Command'

This is what the beginning looks like display.launch.py which I copied from the tutorial

import launch
from launch.substitutions import Command, LaunchConfiguration
import launch_ros
import os

def generate_launch_description():
    pkg_share = launch_ros.substitutions.FindPackageShare(package='vector_description').find('vector_description')
    default_model_path = os.path.join(pkg_share, 'src/description/vector_description.urdf')
    default_rviz_config_path = os.path.join(pkg_share, 'rviz/urdf_config.rviz')

    robot_state_publisher_node = launch_ros.actions.Node(
        package='robot_state_publisher',
        executable='robot_state_publisher',
        parameters=[{'robot_description': Command(['xacro ', LaunchConfiguration('model')])}]

Has anyone encountered this? How can I solve this problem?

SteveMacenski commented 2 years ago

We do not offer support on eloquent and no code is guaranteed to work on it, its far past its support shelf life