Ask Your Question
0

roslib.packages is deprecated, what's its successor?

asked 2015-02-10 04:14:15 -0500

courrier gravatar image

Hi all,

The documentation says roslib.packages is deprecated and lets know that rospkg is the new stable API. However I can't find the equivalent methods in rospkg, what are the new get_pkg_dir(), find_resource() ...?

Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2015-02-10 07:19:29 -0500

updated 2015-02-10 07:24:07 -0500

Here's a snippet that uses rospkg instead of roslib to get a package path:

import rospkg
rospack = rospkg.RosPack()
rospack.get_path('beginner_tutorials')

Here's the documentation for the RosPack class http://docs.ros.org/independent/api/r... . I'm unaware of a replacement for find_resource()

edit flag offensive delete link more

Comments

Thanks for the snippet, it works! Hope there will be an equivalent, this method is really handy.

courrier gravatar imagecourrier ( 2015-02-11 09:21:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-02-10 04:14:15 -0500

Seen: 123 times

Last updated: Feb 10 '15