rospkg.RosPack.pkg_name doesn't return the current building package's src directory when colcon build . So while building the package like jsk_perception , download_data tries to download in /opt/ros/share/jsk_perception and fails because of permission error. This PR fixes it.
When using colcon build, $ROS_PACKAGE_PATH always returns the workspace's install path, not the src directory. This PR downloads data in the install/<some path>/share directory for rospkg to find the appropriate path.
This PR solves 2 problems.
rospkg.RosPack.pkg_name
doesn't return the current building package's src directory whencolcon build
. So while building the package likejsk_perception
,download_data
tries to download in/opt/ros/share/jsk_perception
and fails because of permission error. This PR fixes it.colcon build
,$ROS_PACKAGE_PATH
always returns the workspace's install path, not thesrc
directory. This PR downloads data in theinstall/<some path>/share
directory forrospkg
to find the appropriate path.cc: @sugikazu75