ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

You can get the path of packages with the rospack python library: http://docs.ros.org/melodic/api/rospack/html/

You can get the path of packages with the rospackrospkg python library: http://docs.ros.org/melodic/api/rospack/html/http://docs.ros.org/independent/api/rospkg/html/python_api.html

import rospkg
rp = rospkg.RosPack()
package_path = rp.get_path('package_name')

You can get the path of packages with the rospkg python library: http://docs.ros.org/independent/api/rospkg/html/python_api.html

import rospkg
rp = rospkg.RosPack()
package_path = rp.get_path('package_name')