Ask Your Question

Revision history [back]

I'll refer to roscpp, but I expect the same goes for rospy.

You can use ros::package::getPath("<my-package-name>") to get the path to <my-package-name>. You'll have to include ros/package.h.

If you think your package name is going to change, then add a parameter to the parameter server and retrieve the name from there.