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

Afaik there is no entrypoint provided for that, but the following oneliner works for me (just an example):

python -c 'import roslaunch; print roslaunch.substitution_args.resolve_args("$(find rospy)")'

This prints:

/opt/ros/lunar/share/rospy

on a Lunar installation.

If you're only interested in finding the locations of packages, then catkin_find_pkg might be an alternative.

Afaik there is no entrypoint provided for that, but the following oneliner works for me (just an example):

python -c 'import roslaunch; print roslaunch.substitution_args.resolve_args("$(find rospy)")'

This prints:

/opt/ros/lunar/share/rospy

on a Lunar installation.

If you're only interested in finding the locations of packages, then catkin_find_pkg might be an alternative.alternative:

catkin_find_pkg rospy /opt/ros