Robotics StackExchange | Archived questions

roslaunch unable to find packages but works with rosrun

I am using ros noetic, ubuntu 20.04. I want to spawn robot in gazebo.

<launch>
    <node name="robot_spawn_node" pkg="gazebo_ros" type="spawn_entity" output="screen" args="-model simple_skid_steer -sdf -file /home/vishnu/Workspace/pes_major_project_ws/src/et_mapping_sim/models/simple_skid_steer/model.sdf"/>


    <include file="$(find gazebo_ros)/launch/empty_world.launch">
        <arg name="world_name" value="/home/vishnu/Workspace/pes_major_project_ws/src/et_mapping_sim/worlds/marsyard2020.world.xacro"/>
        <arg name="paused" value="false"/>
        <arg name="use_sim_time" value="true"/>
        <arg name="gui" value="true"/>
        <arg name="recording" value="false"/>
        <arg name="debug" value="false"/>
    </include>
</launch>

Gazebo is launching but for spawn entity im getting the following error

ERROR: cannot launch node of type [gazebo_ros/spawn_entity]: Cannot locate node of type [spawn_entity] in package [gazebo_ros]. Make sure file exists in package path and permission is set to executable (chmod +x)

But when i run both of it using rosrun, it's working.

Asked by r3tro-t3ch on 2022-11-22 04:10:18 UTC

Comments

Please provide a link to the tutorial or source code package you are using.

Asked by Mike Scheutzow on 2022-11-22 20:53:59 UTC

im not refering to any tutorial. I created a package and i wanted to run gazebo and spawn a robot there

Asked by r3tro-t3ch on 2022-11-22 22:44:39 UTC

Answers

In ros package gazebo_ros, I do not see an executable named spawn_entity. I do see one called spawn_model.

Asked by Mike Scheutzow on 2022-11-23 07:13:35 UTC

Comments