Package not found (rospack find: error)

asked 2019-07-12 17:06:47 -0500

mkb_10062949 gravatar image

updated 2019-07-13 13:47:16 -0500

Hello I am using ROS - melodic with ubuntu 18.04 LTS,

I have the following packages in catkin_ws/src directory

catkin_ws/src/rosin_sia10/sia10f_gazebo/launch/sia10f_gazebo.launch

and

catkin_ws/src/rosin_sia10/sia10f_control/config/sia10f_control.yaml

yes I already did setup.bash

However, when I try launching the gazebo file i.e. roslaunch rosin_sia10 sia10f_gazebo.launch

i get the following error,

roslaunch rosin_sia10 sia10f_gazebo.launch
... logging to /home/murtaza/.ros/log/7286922a-a58c-11e9-9062-000c298dc171/roslaunch-ubuntu-10514.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

inconsistent namespace redefinitions for xmlns:xacro:
 old: http://www.ros.org/wiki/xacro
 new: http://ros.org/wiki/xacro (/home/murtaza/catkin_ws/src/sia10f_description/urdf/sia10f_macro.xacro)
inconsistent namespace redefinitions for xmlns:xacro:
 old: http://www.ros.org/wiki/xacro
 new: http://ros.org/wiki/xacro (/home/murtaza/catkin_ws/src/sia10f_description/urdf/robotcell_macro.xacro)
xacro.py is deprecated; please use xacro instead
Resource not found: sia10f_control
ROS path [0]=/opt/ros/melodic/share/ros
ROS path [1]=/home/murtaza/catkin_ws/src
ROS path [2]=/opt/ros/melodic/share
The traceback for the exception was written to the log file
murtaza@ubuntu:~/catkin_ws/src$ ^C

seems that ros is unable to detect the sia10f_control package within the rosin_sia10

This is my sia10f_gazebo.launch file

<?xml version="1.0"?>

<launch>

  <arg name="sim" default="true" />

  <param name="robot_description" command="$(find xacro)/xacro.py $(find sia10f_description)/urdf/sia10f.gazebo.xacro"/>

  <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  <group if="$(arg sim)"> 
    <node name="spawn_sia10f" pkg="gazebo_ros" type="spawn_model" args="-param robot_description -urdf -model sia10f"/>
    <include file="$(find gazebo_ros)/launch/empty_world.launch">
      <arg name="debug" value="false"/>
      <arg name="gui" value="true"/>
      <arg name="paused" value="true"/>
      <arg name="use_sim_time" value="true"/>
      <arg name="headless" value="false"/>
    <!-- more default parameters can be changed here -->
    </include>
    <!--node name="spawn_kinect" pkg="gazebo_ros" type="spawn_model" args="-param robot_description_kinect -urdf -model kinect"/-->
    <node name="spawn_green_box" pkg="gazebo_ros" type="spawn_model" args="-sdf -file $(find sia10f_description)/urdf/models/green_box/model.sdf -x -0.1 -y -0.45 -z 1 -model green_box"/>
    <node name="spawn_red_box" pkg="gazebo_ros" type="spawn_model" args="-sdf -file $(find sia10f_description)/urdf/models/red_box/model.sdf -x 0.1 -y -0.45 -z 1 -model red_box"/>
    <node name="spawn_blue_box" pkg="gazebo_ros" type="spawn_model" args="-sdf -file $(find sia10f_description)/urdf/models/blue_box/model.sdf -x 0.3 -y -0.45 -z 1 -model blue_box"/>
    <node name="spawn_tag_1" pkg="gazebo_ros" type="spawn_model" args="-sdf -file $(find sia10f_description)/urdf/models/tag_1/model.sdf -x 0.0 -y -0.3 -z 1 -model tag_1"/>
    <node name="spawn_tag_2" pkg="gazebo_ros" type="spawn_model" args="-sdf -file $(find sia10f_description)/urdf/models/tag_2/model.sdf -x 0.2 -y -0.3 -z 1 -model tag_2"/>
    <node name="spawn_tag_3" pkg="gazebo_ros" type="spawn_model" args="-sdf -file $(find ...
(more)
edit retag flag offensive close merge delete

Comments

Can you please update your question with a copy and paste of the error?

jayess gravatar imagejayess ( 2019-07-12 17:50:07 -0500 )edit

There are multiple things here either incorrect or not as they should be:

I have also tried launching it after catkin_ws/devel/setup.bash

are you actually executing that file, or source-ing it?

when I do a rospack find xxx (sub folder within package_name) it again shows an error

rospack find doesn't work that way, you can only find packages, not folders

Finally: I also commented this on #q328293, but I feel you should ask the creators of that (video) tutorial about all of this. They are the ones who know how things are supposed to work and what the failure modes are.

gvdhoorn gravatar imagegvdhoorn ( 2019-07-13 03:15:38 -0500 )edit

I am just sourcing the bash file not executing, and roslaunch just doesn't work with this package because it is not able to detect it's launch file. For other packages it works perfectly fine

mkb_10062949 gravatar imagemkb_10062949 ( 2019-07-13 08:49:59 -0500 )edit

rospack find only works with package names, not directories, and also not with "sub folder within package_name".

gvdhoorn gravatar imagegvdhoorn ( 2019-07-13 09:21:36 -0500 )edit