ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
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 image courrier  ( 2015-02-11 09:21:10 -0500 )edit

Question Tools

1 follower

Stats

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

Seen: 415 times

Last updated: Feb 10 '15