Robotics StackExchange | Archived questions

Access non-ROS resource from .launch/C++

(Very similar to this thread (Path to resource files in C++ node) but different.)

For example, OpenCV installs config files in /opt/ros/kinetic/share/OpenCV-3.1.0-dev/haarcascades on Xenial, which is under ros directory but not accessible by rospack. Hardcoding the specific path works for sure, but I'm afraid we'll need to update per every change in the upstream.

Either runtime solution in roslaunch or code C++/Python works.

(Related discussion in `people package.)

Asked by 130s on 2017-02-15 23:42:00 UTC

Comments

Answers

Maybe the following can help you:

https://github.com/CodeFinder2/roslaunch2

(I am the author of that package.)

So may be you can use Python code to find the correct path.

Asked by CodeFinder on 2020-06-23 17:57:15 UTC

Comments