[Python] Encountering issues when trying to run .launch file with ROS 2 Humble

Discussão em 'Python' iniciado por Stack, Fevereiro 24, 2025.

  1. Stack

    Stack Membro Participativo

    My launch file is the following: `

    <!-- Load the URDF model into Gazebo -->
    <param name="robot_description" textfile="$(find mower_sim)/urdf/mower.urdf"/>

    <!-- Spawn the URDF model in Gazebo -->
    <node name="spawn_urdf" pkg="gazebo_ros" executable="spawn_entity.py" output="screen"
    args="-entity mower -file $(arg robot_description) -x 0 -y 0 -z 0"/>

    <!-- Start your BCD node -->
    <node name="bcd_node" pkg="mower_sim" executable="bcd_node" output="screen"/>


    `

    and the .urdf file is:


    [INFO] [launch]: All log files can be found below /home/name/.ros/log/2024-04-22-15-13-04-182156-name-Compaq-CQ58-Notebook-PC-8898
    [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 [launch]: Attribute exec of type <class 'str'> not found in Entity node
    ​

    When I try to run the launch file, I get the above error.

    I tried removing/adding the .py from bcd_node but it didn't seem to make a difference. I am thinking it may be something with my URDF file. I also made sure that gazebo_ros is installed on my machine.

    Continue reading...

Compartilhe esta Página