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.
Please provide a link to the tutorial or source code package you are using.
im not refering to any tutorial. I created a package and i wanted to run gazebo and spawn a robot there