Skip to content

Commit cefc083

Browse files
committed
temp changes
1 parent c52dae7 commit cefc083

2 files changed

Lines changed: 38 additions & 10 deletions

File tree

‎CMakeLists.txt‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ MESSAGE(STATUS "Using compiler: ${CMAKE_CXX_COMPILER}")
66
MESSAGE(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
77
MESSAGE(STATUS "Arch: ${CMAKE_SYSTEM_PROCESSOR}")
88

9+
# Ensure installed binaries know where to find project / ROS / torch libs
10+
set(INSTALL_RPATH_DIRS
11+
"${CMAKE_INSTALL_PREFIX}/lib"
12+
"${CMAKE_INSTALL_PREFIX}/${PROJECT_NAME}/lib")
13+
if(DEFINED ENV{ROS_DISTRO})
14+
list(APPEND INSTALL_RPATH_DIRS "/opt/ros/$ENV{ROS_DISTRO}/lib")
15+
endif()
16+
set(CMAKE_SKIP_BUILD_RPATH FALSE)
17+
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
18+
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
19+
920
# ROS2 compilation
1021
MESSAGE(STATUS "Compiling with ROS2")
1122
add_compile_definitions(ROS2)
@@ -71,6 +82,14 @@ else()
7182
MESSAGE(WARNING "LibTorch not found - deep learning evaluator disabled")
7283
endif()
7384

85+
if(Torch_FOUND AND EXISTS "${TORCH_INSTALL_PREFIX}/lib")
86+
list(APPEND INSTALL_RPATH_DIRS "${TORCH_INSTALL_PREFIX}/lib")
87+
endif()
88+
list(REMOVE_DUPLICATES INSTALL_RPATH_DIRS)
89+
set(CMAKE_INSTALL_RPATH "${INSTALL_RPATH_DIRS}" CACHE STRING "Install RPATH" FORCE)
90+
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE CACHE BOOL "Use link paths in install RPATH" FORCE)
91+
set(CMAKE_SKIP_INSTALL_RPATH FALSE CACHE BOOL "Keep RPATH on install" FORCE)
92+
7493
# Use C++20 for auto parameters, but fallback to C++17 for compatibility
7594
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "10.0")
7695
SET(CMAKE_CXX_FLAGS "-std=c++20 -Wall")
@@ -237,6 +256,16 @@ target_include_directories(navigation_tests PRIVATE
237256
${OpenCV_INCLUDE_DIRS}
238257
)
239258

259+
set_target_properties(navigation PROPERTIES
260+
INSTALL_RPATH "${INSTALL_RPATH_DIRS}"
261+
BUILD_RPATH "${INSTALL_RPATH_DIRS}"
262+
)
263+
264+
set_target_properties(navigation_tests PROPERTIES
265+
INSTALL_RPATH "${INSTALL_RPATH_DIRS}"
266+
BUILD_RPATH "${INSTALL_RPATH_DIRS}"
267+
)
268+
240269
# Install targets
241270
install(TARGETS navigation navigation_tests
242271
DESTINATION lib/${PROJECT_NAME}

‎config/navigation.lua‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ function deg2rad(deg)
33
end
44

55
NavigationParameters = {
6-
dt = 0.060;
6+
dt = 0.025;
77
linear_limits = {
88
max_acceleration = 0.5;
99
max_deceleration = 0.5;
@@ -17,7 +17,7 @@ NavigationParameters = {
1717
actuation_latency = 0.24;
1818
obstacle_margin = 0.15;
1919
num_options = 31;
20-
robot_width = 0.44;
20+
robot_width = 0.7;
2121
robot_length = 0.5;
2222
base_link_offset_x = 0;
2323
base_link_offset_y = 0;
@@ -38,17 +38,16 @@ NavigationParameters = {
3838

3939
ROSTopics = {
4040
laser_topics = {
41-
"/scan",
42-
-- "/velodyne_2dscan",
43-
"/kinect_laserscan",
41+
"/robot0/scan",
42+
-- "/kinect_laserscan",
4443
};
45-
odom_topic = "/odom";
46-
localization_topic = "localization";
44+
odom_topic = "/robot0/odom";
45+
localization_topic = "/robot0/localization";
4746
goto_topic = "/move_base_simple/goal";
4847
goto_amrl_topic = "/move_base_simple/goal_amrl";
4948
reset_nav_goals_topic = "/reset_nav_goals";
5049
halt_topic = "halt_robot";
51-
twist_drive_topic = "navigation/cmd_vel";
50+
twist_drive_topic = "/robot0/cmd_vel";
5251
ackermann_drive_topic = "ackermann_curvature_drive";
5352
nav_status_topic = "navigation_goal_status";
5453
visualization_topic = "visualization";
@@ -59,7 +58,7 @@ ROSTopics = {
5958

6059
ROSFrames = {
6160
map_frame = "map";
62-
robot_frame = "base_link";
61+
robot_frame = "robot0/base_link";
6362
};
6463

6564
AckermannSampler = {
@@ -90,4 +89,4 @@ CommandMapping = {
9089
intercept_neg = -0.0108195;
9190
};
9291
};
93-
};
92+
};

0 commit comments

Comments
 (0)