Reputation: 11
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.
Upvotes: 0
Views: 420
Reputation: 119
The error you are encountering is quite clear:
You "node" statement in your xml misses the "exec" field. This is probably the result of your launch file being previously used in ROS1. ROS2 requires this, see e.g. from the official tutorials on launch:
<launch> <node pkg="demo_nodes_cpp" exec="talker" name="talker"/> </launch>
Upvotes: 0