How to get the executable path of a node with C++?
Is there an easy way to get the whole path for a executable in a package with C++? like getPath for the package path? (ros/package.h)
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Is there an easy way to get the whole path for a executable in a package with C++? like getPath for the package path? (ros/package.h)
In the main fonction,the argv[0] is the executable path, you can theck it as below:
int main(int argc,char ** argv){
printf("s%",argv[0]);
return 0;
}
I guess he rather wants to know where an executable for a specific package is. (A program in package A wants to find out where a specific program in package B is located)
Asked: 2015-08-18 10:13:53 -0500
Seen: 571 times
Last updated: Aug 19 '15
How to correctly declare a Polygon message
ModuleNotFoundError: No module named 'netifaces'
navigation stack with teb_local_planner planning path through wall
Best practices to use subscriber inside a class
Testing performance of my global planner
How to load CollisionObject or PointCloud files via ROS C++ API
Using Catkin with CMake Interface Library