Skip to content

Commit 7afb753

Browse files
Tomas BacaTomas Baca
authored andcommitted
refactored get_public_params
1 parent f8b0a1f commit 7afb753

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ install(
164164
install(
165165
DIRECTORY scripts
166166
USE_SOURCE_PERMISSIONS
167-
DESTINATION share/${PROJECT_NAME}
167+
DESTINATION lib/${PROJECT_NAME}
168168
)
169169

170170
ament_export_include_directories(

scripts/get_public_params.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/python3
22

3-
import rospkg
3+
from ament_index_python.packages import get_package_share_directory
44
import os
55

66
class ParamsGetter:
@@ -9,9 +9,7 @@ def __init__(self):
99

1010
package_name = "mrs_uav_controllers"
1111

12-
rospack = rospkg.RosPack()
13-
14-
package_path = rospack.get_path(package_name)
12+
package_path = get_package_share_directory(package_name)
1513

1614
file_paths = []
1715

0 commit comments

Comments
 (0)