ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

SW2URDF - urdf .stl files not found

asked 2018-05-26 16:51:37 -0500

chris annin gravatar image

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
edit retag flag offensive close merge delete

Comments

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 ..

gvdhoorn gravatar image gvdhoorn  ( 2018-05-27 03:57:48 -0500 )edit

.. 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)?

gvdhoorn gravatar image gvdhoorn  ( 2018-05-27 03:58:23 -0500 )edit

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:

chris annin gravatar image chris annin  ( 2018-05-27 13:17:23 -0500 )edit

https://github.com/Chris-Annin/AR2 thank you for your help btw

chris annin gravatar image chris annin  ( 2018-05-27 13:17:53 -0500 )edit

and run the setup.bash

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

gvdhoorn gravatar image gvdhoorn  ( 2018-05-27 13:50:45 -0500 )edit

correct - I entered the command source /home/chris/catkin_ws/devel/setup.bash

chris annin gravatar image chris annin  ( 2018-05-27 14:02:27 -0500 )edit

Ok. And after you've done that, what is the output of rospack find AR2urdf?

gvdhoorn gravatar image gvdhoorn  ( 2018-05-27 14:03:39 -0500 )edit

[rospack] Error: package 'AR2urdf' not found

chris annin gravatar image chris annin  ( 2018-05-27 14:29:31 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-05-27 14:34:47 -0500

gvdhoorn gravatar image

updated 2018-05-27 14:36:31 -0500

[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?

edit flag offensive delete link more

Comments

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

chris annin gravatar image chris annin  ( 2018-05-27 14:54:37 -0500 )edit

me in the right direction.

chris annin gravatar image chris annin  ( 2018-05-27 14:54:44 -0500 )edit

moving the file to the ros share directory

where did you move what file exactly?

gvdhoorn gravatar image gvdhoorn  ( 2018-05-27 15:20:50 -0500 )edit

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.

chris annin gravatar image chris annin  ( 2018-05-27 16:16:48 -0500 )edit

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.

chris annin gravatar image chris annin  ( 2018-05-27 16:19:55 -0500 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2018-05-28 01:31:39 -0500 )edit

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 ..

gvdhoorn gravatar image gvdhoorn  ( 2018-05-28 01:34:27 -0500 )edit

.. 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.

gvdhoorn gravatar image gvdhoorn  ( 2018-05-28 01:35:30 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-05-26 16:51:37 -0500

Seen: 2,265 times

Last updated: May 27 '18