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
Path planning and object manipulation.
Best practices to use subscriber inside a class
ROSBag C++ API -- reading message Header
How to use Python setuptools to build a Python extension
ROS2 compiled node release executable crashes when launched from a different computer
c++ api to get message md5sum from string msg type (e.g. std_msgs/Int32)
Path planning for quadrocopter using GPS
listing parameters or using a dictionary
<nao_msgs::JointAngleTrajectory> segmentation fault nao [closed]