Package not found (rospack find: error)
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 ...
Can you please update your question with a copy and paste of the error?
There are multiple things here either incorrect or not as they should be:
are you actually executing that file, or
source
-ing it?rospack find
doesn't work that way, you can onlyfind
packages, not foldersFinally: 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.
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
rospack find
only works with package names, not directories, and also not with "sub folder within package_name".