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)
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)
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2015-08-18 10:13:53 -0500
Seen: 494 times
Last updated: Aug 19 '15
Pointer image multi-channel access
ros msg constructor c++ [closed]
ROS2: How to publish cv Mat image?
Catkin - files are not found after install. Wrong directories?
Storing service response into a variable
Controller algorithm implementation in ROS/Gazebo
ROS Arduino Sabertooth Controller
ROSBag C++ API -- reading message Header