0
$\begingroup$

Rosanswers logo

Ive used SW2URDF to export a urdf but every time I get errors stating the models cannot be found. Ive been at this for 2 days straight, the models are in fact there and there isnt any discrepancy in path or file name, case is correct. Ive poured over the forum and tried everything from changing the filepath to complelety reinstalling ros, move it and reconfiguring workspace. im running ubunto 16.04 and kinetic any insight would be appreciated:

[ERROR] [1527370549.957216539]: Error retrieving file [package://AR2urdf/meshes/base_link.STL]: Package [AR2urdf] does not exist

Originally posted by chris annin on ROS Answers with karma: 58 on 2018-05-26

Post score: 0


Original comments

Comment by gvdhoorn on 2018-05-27:
The easiest way to help you would be to show us your package. If you can upload it to github or some other service someone can take a look.

As to the error you show: that is a generic error telling you that for some reason, the resource retriever library can't find a pkg by that name. Have you ..

Comment by gvdhoorn on 2018-05-27:
.. build your workspace and done a source /path/to/catkin_ws/devel/setup.bash before trying to start any launch files (or load your urdf in some other way)?

Comment by chris annin on 2018-05-27:
Ive built my workspace and run the setup.bash as you point out. I think I have it all setup correctly but ROS and linux are new to me. Ive had so many requests-comments about ROS im trying to learn this quickly. I placed the urdf file created by SW2URDF to the project repository here:

Comment by chris annin on 2018-05-27:
https://github.com/Chris-Annin/AR2 thank you for your help btw

Comment by gvdhoorn on 2018-05-27:\

and run the setup.bash

you cannot 'run it'. You must use source /path/to/catkin_ws/devel/setup.bash.

Comment by chris annin on 2018-05-27:
correct - I entered the command source /home/chris/catkin_ws/devel/setup.bash

Comment by gvdhoorn on 2018-05-27:
Ok. And after you've done that, what is the output of rospack find AR2urdf?

Comment by chris annin on 2018-05-27:
[rospack] Error: package 'AR2urdf' not found

Comment by chris annin on 2018-05-27:
I had the urdf in my home folder. I just moved it to the ros share folder and now the output is /opt/ros/kinetic/share/AR2urdf moveit now opened the file with no issues. I did have the urdf in the share folder previously with the same errors. I assume a combination of not having my workspace

Comment by chris annin on 2018-05-27:
setup correctly followed by not moving the urdf to a place within the ros folder was this issue? than you very much for your time.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

[rospack] Error: package 'AR2urdf' not found

This is the cause of the Error retrieving file errors you are getting.

Looking at your package manifest I know why:

<package>
  <name>AR2urdf</name>
  <version>1.0.0</version>
  <description>
    <p>URDF Description package for AR2urdf</p>
    <p>This package contains configuration data, 3D models and launch files
for AR2urdf robot</p>
  </description>
  <author>me</author>
  <maintainer email="me2email.com" />
  <license>BSD</license>
  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>roslaunch</build_depend>
  <run_depend>robot_state_publisher</run_depend>
  <run_depend>rviz</run_depend>
  <run_depend>joint_state_publisher</run_depend>
  <run_depend>gazebo</run_depend>
  <export>
    <architecture_independent />
  </export>
</package>

Look at the email attribute of the maintainer element: me2email.com is not a valid email address.

If I ask catkin_tools to list the pkgs in a workspace with just your package, I get this:

Error: The directory /catkin_ws/src contains an invalid package. See below for details:

Invalid email "me2email.com" for person ""
Warning: Catkin package name "AR2urdf" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, and underscores.

Correcting the email address immediately solves this.

I'm pretty sure correcting your email address, rebuilding your workspace, resourceing devel/setup.bash and then trying again will make things work.


Edit: you must have seen errors while building your workspace. If I do not correct the email address and try to run catkin_make, I get this:

Base path: /catkin_ws
Source space: /catkin_ws/src
Build space: /catkin_ws/build
Devel space: /catkin_ws/devel
Install space: /catkin_ws/install
WARNING: Catkin package name "AR2urdf" does not follow the naming conventions. It should start with a lower case letter and only contain lower case letters, digits, and underscores.
Invalid email "me2email.com" for person ""

It doesn't even try to build the package.

Which setup.bash file did you source in your workspace?


Originally posted by gvdhoorn with karma: 86574 on 2018-05-27

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by chris annin on 2018-05-27:
I didnt see any errors this time but moving the file to the ros share directory and then re entering source /home/chris/catkin_ws/devel/setup.bash seemed to do the trick. the robot is now open in moveit. thank you for your help. Im not sure I would have made much progress without you sending

Comment by chris annin on 2018-05-27:
me in the right direction.

Comment by gvdhoorn on 2018-05-27:\

moving the file to the ros share directory

where did you move what file exactly?

Comment by chris annin on 2018-05-27:
I moved the AR2urdf.urdf file into opt/ros/kinetic/share directory. when you had me check rospack find AR2urdf and it could not find it I made the assumption that the urdf files needed to be within the ROS directory - is this correct or did this not matter? thank you.

Comment by chris annin on 2018-05-27:
I obviously have a lot to learn - this is very foreign to me. Im going through some ROS tutorials on catkin and cmake now. let me know if you know of any other resources I should be studying. thanks again.

Comment by gvdhoorn on 2018-05-28:
re: /opt/ros/kinetic/share: rule of thumb: don't ever touch directories under /opt/ros, or at least, don't manually move files there. It should not be necessary and if you do think it's necessary, something is wrong. Until you get a better grasp of things, don't touch those directories.

Comment by gvdhoorn on 2018-05-28:
Always pay attention to the output of commands on the command line. The fact that you "got the prompt back" does not mean everything is ok.

re: lot to learn: realise that ROS uses a lot of other tools. There are very few things really ROS-specific. Catkin ~= CMake. Find a CMake tutorial and ..

Comment by gvdhoorn on 2018-05-28:
.. then come back to ROS/Catkin. You'll find a lot of 'magic incantations' will have become clear.

Same with programming: if you don't have any C++/Python experience, don't try to learn programming and ROS at the same time. It can be very confusing.

Comment by gvdhoorn on 2018-05-28:\

I didnt see any errors this time but moving the file to the ros share directory [..]

Moving the file was not necessary after we fixed the error(s). Please remove the file again.

$\endgroup$

Your Answer

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