0
$\begingroup$

Rosanswers logo

After creating a ROS package i'm trying the compile a code for a publisher node. I execute the command

rosmake minimal_nodes

The following error appears:

[ rosmake ] rosmake starting...
[ rosmake ] Packages requested are: ['minimal_nodes']
[ rosmake ] Logging to directory /home/fcs_basestation/.ros/rosmake/rosmake_output-20141120-145630 [ rosmake ] Expanded args ['minimal_nodes'] to: []
[ rosmake ] WARNING: The following args could not be parsed as stacks or packages: ['minimal_nodes'] [ rosmake ] ERROR: No arguments could be parsed into valid package or stack names.

I know i have to add the package to the ros_package_path. My question is how i do that? I have seen this question a lot of time here with worthless answers to it. I'm using hydro.


Originally posted by ed_win33 on ROS Answers with karma: 1 on 2014-11-20

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If the package you want to build is a rosbuild package (it has a manifest.xml and not a package.xml) then you need to put one of its containing folders in the ROS_PACKAGE_PATH. Imagine you have something like this:

% tree /tmp/my_workspace
/tmp/my_workspace
└── my_package
    └── manifest.xml
    └── ...

1 directory, 1 file

And you want to build my_package, then you should put at least the my_workspace folder on the ROS_PACKAGE_PATH:

$ export ROS_PACKAGE_PATH=/tmp/my_workspace:$ROS_PACKAGE_PATH

That will allow rosmake to find your package and try to build it.

Also you should do that export line after sourcing any other setup.bash files, e.g. source /opt/ros/hydro/setup.bash.


Originally posted by William with karma: 17335 on 2014-11-20

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by ed_win33 on 2014-11-21:
Correct, it has a manifest.xml and not a package.xml.

I run the the command: $ export ROS_PACKAGE_PATH=/tmp/my_workspace:$ROS_PACKAGE_PATH replacing my_workspace with TestcodesRos which is my package and i'm still having the same error.

Comment by William on 2014-11-21:
You put the path to TestcodesRos or just TestcodesRos? Please post exactly what you ran.

Comment by ed_win33 on 2014-11-24:
I ran:

$ export ROS_PACKAGE_PATH=/tmp/TestcodeRos:$ROS_PACKAGE_PATH

PD: My TestcodeRos is created on the desktop.

Comment by William on 2014-11-24:
@ed_win33 if TestcodeRos is on your Desktop then you have to put the path to it in your ROS_PACKAGE_PATH... Something like this export ROS_PACKAGE_PATH=/home/YOURUSER/Desktop/TestcodeRos:$ROS_PACKAGE_PATH. It obviously isn't at /tmp/TestcodeRos...

Comment by ed_win33 on 2014-11-25:
I successfully added the package to the path but when I run rosmake minimal_nodes is still not running. Also if i open a new terminal and run echo $ROS_PACKAGE_PATH the package that I just add is not there anymore. I read that this is something to be with the setup.bash.

Comment by ed_win33 on 2014-11-25:
I tried several thing to fix the sourcing, if this is the problem, but no results by now

Comment by William on 2014-11-27:
You have to add it to the RPP in every new terminal or add it to your .bashrc. I would encourage you to read up on Linux terminals and how the shell environment works, the problems you are having are not really ROS related, but are instead related to how shells work in Linux.

$\endgroup$

Your Answer

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