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

little problem creating pkgs

asked 2012-12-03 04:24:45 -0500

monidiaz gravatar image

updated 2012-12-03 22:54:51 -0500

Hi, I'm Trying to do something similar like the shadow hand but more easy. (Cause I do'nt need all the things that the shadow's have). in these way the importan things that i need is the next ones for now obviously:

  • sr_description
  • sr_hardware_interface

  • sr_mechanism_model

i'm trying to do my owns : VT_hardware_interface, VT_mechanism_model,VT_description; and all are in one VirtualTouch pkg. i did pkg VT_description run make and was fine and in same way VT_hardware_interface. but when i gonna run the VT_mechanism_model that depends on one files of the VT_hardware i get the next :

> /home/moni/VirtualTouch/VT_mechanism_model/src/joint_0_transmission.cpp:9:49: error fatal: VT_hardware_interface/VT_actuator.hpp: No existe el archivo o el directorio
compilación terminada.
make[3]: *** [CMakeFiles/VT_mechanism_model.dir/src/joint_0_transmission.o] Error 1
make[3]: se sale del directorio «/home/moni/VirtualTouch/VT_mechanism_model/build»
make[2]: *** [CMakeFiles/VT_mechanism_model.dir/all] Error 2
make[2]: se sale del directorio «/home/moni/VirtualTouch/VT_mechanism_model/build»
make[1]: *** [all] Error 2
make[1]: se sale del directorio «/home/moni/VirtualTouch/VT_mechanism_model/build»
make: *** [all] Error 2

I export the pkg ( source /opt/ros/fuerte/setup.bash AND export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:pwd) on VT_hardware

and doesn't work. some idea what i'm doing wrong? thnks


When Run :



> /opt/ros/fuerte/share:/opt/ros/fuerte/stacks:/home/moni/VirtualTouch/VT_mechanism_model

And for rospack find VT_hardware_interface

[rospack] Error: stack/package VT_hardware_interface not found

In The same way i tried with:

export ROS_PACKAGE_PATH=/home/moni/VirtualTouch/VT_mechanism_model:/home/moni/VirtualTouch/VT_hardware_interface

but it's kind the same error.

edit retag flag offensive close merge delete



What do the echo $ROS_PACKAGE_PATH and rospack find VT_hardware_interface commands print? (Please edit your question to show their output.)

joq gravatar image joq  ( 2012-12-03 06:02:17 -0500 )edit

2 Answers

Sort by » oldest newest most voted

answered 2012-12-04 02:29:13 -0500

Lorenz gravatar image

updated 2012-12-04 03:20:46 -0500

Do not manage your package path manually but use rosws. This page shows how to set up a clean workspace. Put your packages (sr_description, sr_hardware_interface and sr_mechanism_model) in the folder ~/fuerte_workspace/sandbox and, given they all provide the correct export lines in manifest.xml, compilation should just work.

Edit It seems like you put your dependencies right into the ros package you were creating. Don't do that. You cannot nest packages in packages, i.e. a package cannot contain another package. Instead, all three packages and your own package should be direct subdirectories of ~/fuerte_workspace/sandbox.

A few more things to check:

  • Check with echo $ROS_PACKAGE_PATH that you sourced the setup.bash file in ~/fuerte_workspace correctly. It should contain a path to ~/fuerte_workspace/sandbox. If it does not, re-source the setup.bash file in your terminal.

  • You should be able to find your packages with rospack find, e.g.: rospack find sr_hardware_interface. This call should output the absolute path to the respective package. If it does not, check that the package actually contains a manifest.xml file.

  • Verify that sr_hardware_interface is actually exporting C++ flags correctly: rospack export sr_hardware_interface --lang=cpp --attrib=cflags This command should print something like -I/home/you/fuerte_workspace/sandbox/sr_hardware_interface/include. If it does not, add the corresponding export lines to the manifest file.

  • Verify that your package dependencies are right. For instance, the manifest file in VT_mechanism_model needs to depend on sr_hardware_interface. Make sure your dependencies are correct.

edit flag offensive delete link more


I tried this, making like a new Sandbox in my pkg called VirtualTouch doing all of the page u give me, and the erros is the same . i thought that something was wrong with it so i tried copy the files on my really fuerte_workspace/sandbox that a created and utilized for the first tutorials about ros,

monidiaz gravatar image monidiaz  ( 2012-12-04 03:05:11 -0500 )edit

answered 2012-12-04 00:19:24 -0500

updated 2012-12-04 01:48:31 -0500

Have you tried "rospack profile"?

From the tutorial "Creating a Package":

"Now lets make sure that ROS can find your new package. It is often useful to call rospack profile after making changes to your path so that new directories will be found:

$ rospack profile
$ rospack find beginner_tutorials


Try also to export just the folder /home/moni/VirtualTouch:

$ export ROS_PACKAGE_PATH=/home/moni/VirtualTouch:$ROS_PACKAGE_PATH
edit flag offensive delete link more


Yes, I tried it , doesn't work

monidiaz gravatar image monidiaz  ( 2012-12-04 01:13:07 -0500 )edit

Dosn't work One Error... "failed to invoke rospack to get compile flags for package"

monidiaz gravatar image monidiaz  ( 2012-12-04 02:04:26 -0500 )edit

What command doesn´t work? rospack profile? Did you build your packages by hand or using rosbuild?

gustavo.velascoh gravatar image gustavo.velascoh  ( 2012-12-04 02:16:09 -0500 )edit

command make or rosmake. Pkgs created with roscreate-pkg , first VirtualTouch, then inside it the other ones with make. VT_hardware_interface is fine .. just the VT_mechanism_model doesn't find VT_hardware_interface

monidiaz gravatar image monidiaz  ( 2012-12-04 02:24:11 -0500 )edit

Once something similar happens to me, I have to re-create the package. Try recreating your packages but not whitin a package folder, use independent folders for each package. If you can start again using rosws.

gustavo.velascoh gravatar image gustavo.velascoh  ( 2012-12-04 13:56:27 -0500 )edit

Question Tools

1 follower


Asked: 2012-12-03 04:24:45 -0500

Seen: 362 times

Last updated: Dec 04 '12