How to roslaunch cwd=node other project?
I know about the roslaunch
attribute cwd
:
cwd="ROS_HOME|node"(optional)
If 'node', the working directory of the node will be set to the same directory as the node's executable.
-- https://wiki.ros.org/roslaunch/XML/no...
If I want to start my node in the same directory as _another_ node's executable, how might I do that?
In brief, I want an easier way of locating assets belonging to other projects. The simplest trick I know is to roslaunch
a wrapper script wherein I sniff the location of another named project:
#!/bin/sh
if ! other_pkg_dir="$(rospack find other_pkg)"; then
echo "oh noes!"
exit 1
fi
my_package --other-package-dir="${other_pkg_dir}" $@
From your example it's unclear why you cannot use a regular
$(find ..)
roslaunch substitution arg. Please clarify.Because
gives
I may not have been clear. I was specifically asking about this:
If I understand this correctly, this is typically done using something like this (just an example):
What's unclear to me is what you really want to do.
You're asking a question about your selected solution, but it's unclear whether it is an actual solution for what you really want to do (ie; xy-problem).
Starting one node in another node's executable directory _is_ what I "really want to do". I can specialize the problem to fit what
roslaunch
can do, but then I lose the abstraction of launching nodes in arbitrary project binary directories.