Skip to content

Commit 2ca01f4

Browse files
committed
handhsake works, .yaml file needs to be read
1 parent f1e9308 commit 2ca01f4

File tree

596 files changed

+24831
-23
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

596 files changed

+24831
-23
lines changed

CMakeLists.txt

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ project(ros2_orb_slam3)
44
# Make sure to set this path before building the
55
set(ENV{PYTHONPATH} "/opt/ros/humble/lib/python3.10/site-packages/") # Must be set to match your installation
66

7-
87
# Must use C++17 to make it compatible with rclcpp
98
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3")
109
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3")
@@ -25,7 +24,9 @@ LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake_modules) # REDUNDANT?
2524

2625
# find dependencies
2726
find_package(ament_cmake REQUIRED)
27+
find_package(ament_cmake_python REQUIRED)
2828
find_package(rclcpp REQUIRED)
29+
find_package(rclpy REQUIRED)
2930
find_package(std_msgs REQUIRED)
3031
find_package(sensor_msgs REQUIRED)
3132
# find_package(your_custom_msg_interface REQUIRED)
@@ -36,14 +37,14 @@ find_package(Pangolin REQUIRED)
3637
find_package(image_transport REQUIRED)
3738

3839

39-
# Header file locations
40-
include_directories(include) # This package include
40+
# Header file locations [C++ node]
41+
include_directories(include) # Add .hpp, .h files from include/ros2_orb_slam3
4142
include_directories(${EIGEN3_INCLUDE_DIRS}) # Include headers for eigen3
4243
include_directories(${Pangolin_INCLUDE_DIRS}) # include headers for pangolin
4344
include_directories(${OpenCV_INCLUDE_DIRS}) # include headers for pangolin
4445

4546

46-
# ORB-SLAM3 includes
47+
# ORB-SLAM3 includes [VSLAM library]
4748
include_directories(
4849
${PROJECT_SOURCE_DIR}
4950
${PROJECT_SOURCE_DIR}/orb_slam3
@@ -57,6 +58,7 @@ include_directories(
5758

5859
set(THIS_PACKAGE_INCLUDE_DEPENDS
5960
rclcpp
61+
rclpy
6062
std_msgs
6163
sensor_msgs
6264
# your_custom_msg_interface
@@ -68,7 +70,7 @@ set(THIS_PACKAGE_INCLUDE_DEPENDS
6870
)
6971

7072
#* ORB SLAM3 as a shared library
71-
# Whenever you add a new .h, .hpp or .cc, .cpp file in the orb_slam3 directory, make sure to add them here as shown below
73+
# Whenever you add a new .h, .hpp or .cc, .cpp file in the ros2_orb_slam3/orb_slam3/include and os2_orb_slam3/orb_slam3/src directories, make sure to add them here as shown below
7274
add_library(orb_slam3_lib SHARED
7375
orb_slam3/src/System.cc
7476
orb_slam3/src/Tracking.cc
@@ -130,8 +132,7 @@ add_library(orb_slam3_lib SHARED
130132
orb_slam3/include/Settings.h
131133
)
132134

133-
134-
set_target_properties(orb_slam3_lib PROPERTIES VERSION "${orb_slam3_lib_VERSION}")
135+
set_target_properties(orb_slam3_lib PROPERTIES VERSION "${orb_slam3_lib_VERSION}") # TODO need to findout why this is required
135136

136137
ament_target_dependencies(orb_slam3_lib
137138
${THIS_PACKAGE_INCLUDE_DEPENDS}
@@ -151,7 +152,7 @@ target_link_libraries(orb_slam3_lib
151152
)
152153

153154

154-
# Find the .so files built inside orb_slam3/Thirdparty projects
155+
# Find the .so files provided in ros2_orb_slam3/orb_slam3/Thirdparty projects
155156
set(DBoW2_PATH "${PROJECT_SOURCE_DIR}/orb_slam3/Thirdparty/DBoW2/lib/libDBoW2.so")
156157
set(g2o_PATH "${PROJECT_SOURCE_DIR}/orb_slam3/Thirdparty/g2o/lib/libg2o.so")
157158

@@ -196,4 +197,15 @@ ament_export_dependencies(
196197
)
197198

198199

200+
# Python node
201+
# Install Python modules, submodules
202+
ament_python_install_package(${PROJECT_NAME}) # Install the modules in ros2_orb_slam3/ros2_orb_slam3 folder
203+
204+
# Install Python executibles
205+
install(PROGRAMS
206+
scripts/mono_driver_node.py
207+
DESTINATION lib/${PROJECT_NAME}
208+
)
209+
210+
199211
ament_package()

0 commit comments

Comments
 (0)