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: 604 times
Last updated: Aug 19 '15
how to get value of joints [closed]
New Kinect One Permssion issues
How to play video from bag file in QT?
How do I print summary through ROS_INFO
A question about eclipse and c++ in ROS
ROS2 TF publisher not publishing anything
¿There is an example of a working example of serial port on ROS Indigo and C++?
ROS2 how can I call a service and wait for the response from within a subscriber callback?