OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

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

  • Thread starter Thread starter kwasi_dp
  • Start date Start date
K

kwasi_dp

Guest
My launch file is the following: `

Code:
<!-- 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.
<p>My launch file is the following:
`

</p>
<pre><code><!-- 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"/>
</code></pre>
<p>`</p>
<p>and the .urdf file is:</p>
<blockquote>
<p>[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<br />
[INFO] [launch]: Default logging verbosity is set to INFO<br />
[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</p>
</blockquote>
<p>When I try to run the launch file, I get the above error.</p>
<p>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.</p>
 

Latest posts

Top