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

Revision history [back]

click to hide/show revision 1
initial version

If you need a way to find these resource in cases where you do not know if the package is catkinized or not you can use this code which works for all ROS distros:

import rospkg rp = rospkg.RosPack() path = rp.get_path('my_package')

The resulting path will either point to the source folder or the install folder of the package.

If you need a way to find these resource in cases where you do not know if the package is catkinized or not you can use this code which works for all ROS distros:

import rospkg rp = rospkg.RosPack() path = rp.get_path('my_package')

The resulting path will either point to the source folder or the install folder of the package.

If you need a way to find these resource in cases where you do not know if the package is catkinized or not you can use this code which works for all ROS distros:

import rospkg
rp = rospkg.RosPack()
path = rp.get_path('my_package')rp.get_path('my_package')```

The resulting path will either point to the source folder or the install folder of the package.