0
$\begingroup$

As the title mentioned, I made models with urdf files, find some public sdf models, and use the build editor in gazebo to generate walls. However I couldn't find a way to launch them other than launching the urdf model and manually putting sdf and walls in one by one. I've tried to save the built world and launched them but it showed

Resource not found: The following package was not found in <arg name="world_name" value="$(find ros1_wiki)/world/test.world"/>: ros1_wiki ROS path
[0]=/opt/ros/noetic/share/ros ROS path
[1]=/home/rvl224/brian2lee/gazebo/forklift_test/src ROS path
[2]=/opt/ros/noetic/share 
The traceback for the exception was written to the log file

Down below is my launch file and where I saved the world file. I've launched the urdf models successfully using the same launch file without the " arg name="world_name" " line which made me more confused why it showed package not found in the error.

/home/rvl224/brian2lee/gazebo/forklift_test/src/ros1_wiki/world/test.world

<?xml version="1.0"?>
<launch>

    <param name="robot_description" command="xacro '$(find forklift)/urdf/forklift.urdf.xacro'"/>
    <param name="pallet_description" command="xacro '$(find forklift)/urdf/pallet.urdf.xacro'"/>

    <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher"/>
    <node name="joint_state_publisher_gui" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui"/>
    
    <include file="$(find gazebo_ros)/launch/empty_world.launch">
        <arg name="world_name" value="$(find ros1_wiki)/world/test.world"/>
        <arg name="paused" value="false"/>
        <arg name="use_sim_time" value="true"/>
        <arg name="gui" value="true"/>
        <arg name="headless" value="false"/>
        <arg name="debug" value="false"/>
    </include>

    <node name="spawning_forklift" pkg="gazebo_ros" type="spawn_model"
          args="-urdf -model forklift -param robot_description -x -2 -y 0 -z 0 -Y 0"/>

    <node name="spawning_pallet" pkg="gazebo_ros" type="spawn_model"
          args="-urdf -model pallet -param pallet_description -x 0 -y 0 -z 0"/>

</launch>
$\endgroup$

1 Answer 1

0
$\begingroup$

idk why it doesn't find the world package, but after putting in the whole file route

<arg name="world_name" value="/home/rvl224/brian2lee/gazebo/forklift_test/src/ros1_wiki/world/test.world"/>

it works as I expect

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.