Use "standard" function rospkg.get_package_name() for package detection.