Skip to content

Commit

Permalink
Merge branch 'feature/ros2' of github.com:snt-arg/s_graphs into featu…
Browse files Browse the repository at this point in the history
…re/ros2
  • Loading branch information
mgiberna committed May 27, 2024
2 parents ce24cd5 + f7616bf commit 773fa02
Show file tree
Hide file tree
Showing 48 changed files with 408 additions and 386 deletions.
34 changes: 15 additions & 19 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,23 @@
path = utils/ndt_omp
url = https://github.com/koide3/ndt_omp.git
branch = master
[submodule "utils/reasoning/graph_reasoning"]
path = utils/reasoning/graph_reasoning
url = https://github.com/snt-arg/graph_reasoning.git
[submodule "utils/reasoning/situational_graphs_reasoning"]
path = utils/reasoning/situational_graphs_reasoning
url = https://github.com/snt-arg/situational_graphs_reasoning.git
branch = develop
[submodule "utils/reasoning/graph_wrapper"]
path = utils/reasoning/graph_wrapper
url = https://github.com/snt-arg/graph_wrapper.git
[submodule "utils/reasoning/situational_graphs_wrapper"]
path = utils/reasoning/situational_graphs_wrapper
url = https://github.com/snt-arg/situational_graphs_wrapper.git
branch = develop
[submodule "utils/reasoning/graph_datasets"]
path = utils/reasoning/graph_datasets
url = https://github.com/snt-arg/graph_datasets.git
[submodule "utils/reasoning/situational_graphs_datasets"]
path = utils/reasoning/situational_graphs_datasets
url = https://github.com/snt-arg/situational_graphs_datasets.git
branch = develop
[submodule "utils/reasoning/graph_matching"]
path = utils/reasoning/graph_matching
url = https://github.com/snt-arg/graph_matching.git
branch = develop
[submodule "utils/msgs/reasoning_msgs"]
path = utils/msgs/reasoning_msgs
url = https://github.com/snt-arg/reasoning_msgs.git
[submodule "utils/msgs/situational_graphs_reasoning_msgs"]
path = utils/msgs/situational_graphs_reasoning_msgs
url = https://github.com/snt-arg/situational_graphs_reasoning_msgs.git
branch = main
[submodule "utils/msgs/s_graphs_msgs"]
path = utils/msgs/s_graphs_msgs
url = https://github.com/snt-arg/s_graphs_msgs.git
[submodule "utils/msgs/situational_graphs_msgs"]
path = utils/msgs/situational_graphs_msgs
url = https://github.com/snt-arg/situational_graphs_msgs
branch = main
2 changes: 1 addition & 1 deletion .real_mprocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ procs:
autostart: true
stop: SIGINT
s_graphs:
shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && ros2 launch s_graphs s_graphs_launch.py compute_odom:=false env:=real"'
shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && ros2 launch lidar_s_graphs s_graphs_launch.py compute_odom:=false env:=real"'
autostart: true
rviz:
shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && rviz2 -d ~/workspaces/s_graphs/s_graphs/rviz/s_graphs_ros2.rviz"'
Expand Down
26 changes: 9 additions & 17 deletions .rosinstall_ros2
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,19 @@ repositories:
type: git
url: https://github.com/koide3/ndt_omp.git
version: master
s_graphs_utils/reasoning/graph_reasoning:
s_graphs_utils/reasoning/situational_graphs_reasoning:
type: git
url: https://github.com/snt-arg/graph_reasoning.git
url: https://github.com/snt-arg/situational_graphs_reasoning.git
version: complete_gnn_architecture
s_graphs_utils/reasoning/graph_wrapper:
s_graphs_utils/reasoning/situational_graphs_datasets:
type: git
url: https://github.com/snt-arg/graph_wrapper.git
version: develop
s_graphs_utils/reasoning/graph_datasets:
type: git
url: https://github.com/snt-arg/graph_datasets.git
url: https://github.com/snt-arg/situational_graphs_datasets.git
version: graph_reasoning
s_graphs_utils/reasoning/graph_matching:
type: git
url: https://github.com/snt-arg/graph_matching.git
version: develop
s_graphs_utils/msgs/reasoning_msgs:
s_graphs_utils/msgs/situational_graphs_reasoning_msgs:
type: git
url: https://github.com/snt-arg/reasoning_msgs.git
url: https://github.com/snt-arg/situational_graphs_reasoning_msgs.git
version: main
s_graphs_utils/msgs/s_graphs_msgs:
s_graphs_utils/msgs/situational_graphs_msgs:
type: git
url: https://github.com/snt-arg/s_graphs_msgs.git
version: main
url: https://github.com/snt-arg/situational_graphs_msgs.git
version: main
6 changes: 3 additions & 3 deletions .virtual_mprocs.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
procs:
rosbag:
shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && ros2 bag play ~/Downloads/virtual/stugalux_oetrange_f2_3r.db3"'
shell: 'bash -c "sleep 1 && source ~/workspaces/s_graphs/install/setup.bash && ros2 bag play ~/Downloads/virtual/stugalux_oetrange_f2_3r.db3"'
autostart: true
stop: SIGINT
s_graphs:
shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && ros2 launch s_graphs s_graphs_launch.py compute_odom:=true env:=sim"'
shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && ros2 launch lidar_s_graphs s_graphs_launch.py compute_odom:=true env:=sim"'
autostart: true
rviz:
shell: 'bash -c "source ~/workspaces/s_graphs/install/setup.bash && rviz2 -d ~/workspaces/s_graphs/s_graphs/rviz/s_graphs_ros2.rviz"'
autostart: true
autostart: true
2 changes: 1 addition & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "Linux",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/install/**",
"/opt/ros/foxy/include/**",
"/usr/include/**",
"/usr/local/include/**"
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"*.inc": "cpp",
"nonlinearoptimization": "cpp"
},
"C_Cpp.errorSquiggles": "enabled",
"C_Cpp.errorSquiggles": "disabled",
"python.formatting.provider": "black",
"python.analysis.extraPaths": [
"${workspaceFolder}/install/s_graphs/lib/python3.8/site-packages",
Expand Down
42 changes: 21 additions & 21 deletions s_graphs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: BSD-2-Clause
cmake_minimum_required(VERSION 3.5)
project(s_graphs)
project(lidar_s_graphs)

# Can we use C++17 in indigo?
add_definitions(-msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2)
Expand Down Expand Up @@ -41,10 +41,10 @@ find_package(tf2_ros REQUIRED)
find_package(tf2_eigen REQUIRED)
find_package(message_filters REQUIRED)
find_package(geographic_msgs REQUIRED)
find_package(reasoning_msgs REQUIRED)
find_package(situational_graphs_reasoning_msgs REQUIRED)
find_package(backward_ros REQUIRED)
find_package(rviz_visual_tools REQUIRED)
find_package(s_graphs_msgs REQUIRED)
find_package(situational_graphs_msgs REQUIRED)


find_package(PCL REQUIRED)
Expand Down Expand Up @@ -92,14 +92,14 @@ set(DEPENDENCIES
tf2_ros
tf2_eigen
pcl_ros
reasoning_msgs
situational_graphs_reasoning_msgs
visualization_msgs
message_filters
geographic_msgs
nmea_msgs
geodesy
rviz_visual_tools
s_graphs_msgs)
situational_graphs_msgs)

SET(G2O_COMMON_LIBS
${PCL_LIBRARIES}
Expand All @@ -120,40 +120,40 @@ FILE(GLOB_RECURSE S_GRAPHS_SOURCE_FILES
${CMAKE_CURRENT_SOURCE_DIR}/src/s_graphs/*.cpp
)

add_library(g2o_sgraphs
add_library(g2o_${PROJECT_NAME}
${G2O_S_GRAPHS_SOURCE_FILES}
)
target_link_libraries(g2o_sgraphs
target_link_libraries(g2o_${PROJECT_NAME}
${G2O_COMMON_LIBS}
${PCL_LIBRARIES}
)

add_library(s_graphs_core_lib
add_library(${PROJECT_NAME}_core_lib
${S_GRAPHS_SOURCE_FILES}
)
target_link_libraries(s_graphs_core_lib
g2o_sgraphs
target_link_libraries(${PROJECT_NAME}_core_lib
g2o_${PROJECT_NAME}
${G2O_COMMON_LIBS}
${PCL_LIBRARIES}
)
target_include_directories(s_graphs_core_lib
target_include_directories(${PROJECT_NAME}_core_lib
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
ament_target_dependencies(s_graphs_core_lib ${DEPENDENCIES})
ament_target_dependencies(${PROJECT_NAME}_core_lib ${DEPENDENCIES})

ament_export_targets(export_s_graph_lib HAS_LIBRARY_TARGET)
ament_export_dependencies(${DEPENDENCIES})
ament_export_include_directories(include)
ament_export_libraries(s_graphs_core_lib)
ament_export_libraries(${PROJECT_NAME}_core_lib)


add_executable(s_graphs_node
apps/s_graphs_node.cpp
)
ament_target_dependencies(s_graphs_node ${DEPENDENCIES})
target_link_libraries(s_graphs_node
s_graphs_core_lib
${PROJECT_NAME}_core_lib
)

# nodes
Expand All @@ -168,7 +168,7 @@ add_executable(s_graphs_room_segmentation_node
)
ament_target_dependencies(s_graphs_room_segmentation_node ${DEPENDENCIES})
target_link_libraries(s_graphs_room_segmentation_node
s_graphs_core_lib
${PROJECT_NAME}_core_lib
${PCL_LIBRARIES}
)

Expand All @@ -177,15 +177,15 @@ add_executable(s_graphs_floor_plan_node
)
ament_target_dependencies(s_graphs_floor_plan_node ${DEPENDENCIES})
target_link_libraries(s_graphs_floor_plan_node
s_graphs_core_lib
${PROJECT_NAME}_core_lib
${PCL_LIBRARIES}
)

add_executable(s_graphs_scan_matching_odometry_node apps/scan_matching_odometry_node.cpp)
ament_target_dependencies(s_graphs_scan_matching_odometry_node ${DEPENDENCIES})
target_link_libraries(s_graphs_scan_matching_odometry_node
${PCL_LIBRARIES}
s_graphs_core_lib
${PROJECT_NAME}_core_lib
)

#############
Expand All @@ -198,7 +198,7 @@ install(
)

install(
TARGETS s_graphs_core_lib g2o_sgraphs
TARGETS ${PROJECT_NAME}_core_lib g2o_${PROJECT_NAME}
EXPORT export_s_graph_lib
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
Expand Down Expand Up @@ -240,14 +240,14 @@ if(BUILD_TESTING)
ament_lint_auto_find_test_dependencies()

ament_add_gtest(testPlane test/testPlane.cpp)
target_link_libraries(testPlane s_graphs_core_lib ${PCL_LIBRARIES} ${G2O_LIBRARIES})
target_link_libraries(testPlane ${PROJECT_NAME}_core_lib ${PCL_LIBRARIES} ${G2O_LIBRARIES})

ament_add_gtest(testRoom test/testRoom.cpp)
target_link_libraries(testRoom s_graphs_core_lib ${PCL_LIBRARIES} ${G2O_LIBRARIES})
target_link_libraries(testRoom ${PROJECT_NAME}_core_lib ${PCL_LIBRARIES} ${G2O_LIBRARIES})

# ament_add_gtest(testRoomCentreCompute test/testRoomCentreCompute.cpp src/s_graphs/room_utils.cpp)
ament_add_gtest(testRoomCentreCompute test/testRoomCentreCompute.cpp)
target_link_libraries(testRoomCentreCompute s_graphs_core_lib ${PCL_LIBRARIES} ${G2O_LIBRARIES})
target_link_libraries(testRoomCentreCompute ${PROJECT_NAME}_core_lib ${PCL_LIBRARIES} ${G2O_LIBRARIES})

install(TARGETS
testPlane testRoom testRoomCentreCompute DESTINATION test/${PROJECT_NAME})
Expand Down
Loading

0 comments on commit 773fa02

Please sign in to comment.