modify some path in thridparty
This commit is contained in:
+9
-7
@@ -101,13 +101,15 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||||||
# Set optimization flags
|
# Set optimization flags
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
|
||||||
|
|
||||||
set(TARGET_PREDICTION_DEPLOY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../TargetPrediction/deploy")
|
set(TARGET_PREDICTION_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../..")
|
||||||
|
set(TARGET_PREDICTION_DEPLOY_DIR "${TARGET_PREDICTION_ROOT_DIR}/deploy")
|
||||||
|
set(TARGET_PREDICTION_THIRDPARTY_DIR "${TARGET_PREDICTION_ROOT_DIR}/thirdparty")
|
||||||
set(ODIN_TARGET_OBSERVATION_AVAILABLE OFF)
|
set(ODIN_TARGET_OBSERVATION_AVAILABLE OFF)
|
||||||
set(ODIN_TARGET_OBSERVATION_READY OFF)
|
set(ODIN_TARGET_OBSERVATION_READY OFF)
|
||||||
|
|
||||||
if(ODIN_DRIVER_ENABLE_TARGET_OBSERVATION AND
|
if(ODIN_DRIVER_ENABLE_TARGET_OBSERVATION AND
|
||||||
EXISTS "${TARGET_PREDICTION_DEPLOY_DIR}/YOLOs-CPP-TensorRT/include/yolos/tasks/pose.hpp" AND
|
EXISTS "${TARGET_PREDICTION_THIRDPARTY_DIR}/YOLOs-CPP-TensorRT/include/yolos/tasks/pose.hpp" AND
|
||||||
EXISTS "${TARGET_PREDICTION_DEPLOY_DIR}/motcpp/CMakeLists.txt")
|
EXISTS "${TARGET_PREDICTION_THIRDPARTY_DIR}/motcpp/CMakeLists.txt")
|
||||||
enable_language(CUDA)
|
enable_language(CUDA)
|
||||||
find_package(CUDAToolkit REQUIRED)
|
find_package(CUDAToolkit REQUIRED)
|
||||||
|
|
||||||
@@ -143,7 +145,7 @@ if(ODIN_DRIVER_ENABLE_TARGET_OBSERVATION AND
|
|||||||
set(MOTCPP_INSTALL OFF CACHE BOOL "" FORCE)
|
set(MOTCPP_INSTALL OFF CACHE BOOL "" FORCE)
|
||||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||||
add_subdirectory(
|
add_subdirectory(
|
||||||
${TARGET_PREDICTION_DEPLOY_DIR}/motcpp
|
${TARGET_PREDICTION_THIRDPARTY_DIR}/motcpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/motcpp
|
${CMAKE_CURRENT_BINARY_DIR}/motcpp
|
||||||
EXCLUDE_FROM_ALL
|
EXCLUDE_FROM_ALL
|
||||||
)
|
)
|
||||||
@@ -152,7 +154,7 @@ if(ODIN_DRIVER_ENABLE_TARGET_OBSERVATION AND
|
|||||||
message(WARNING "TensorRT not found. Target observation support disabled.")
|
message(WARNING "TensorRT not found. Target observation support disabled.")
|
||||||
endif()
|
endif()
|
||||||
elseif(ODIN_DRIVER_ENABLE_TARGET_OBSERVATION)
|
elseif(ODIN_DRIVER_ENABLE_TARGET_OBSERVATION)
|
||||||
message(WARNING "TargetPrediction deploy dependencies not found. Target observation support disabled.")
|
message(WARNING "TargetPrediction thirdparty target-observation dependencies not found. Target observation support disabled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Find common dependencies
|
# Find common dependencies
|
||||||
@@ -191,11 +193,11 @@ set(COMMON_LIBS
|
|||||||
if(ODIN_TARGET_OBSERVATION_READY)
|
if(ODIN_TARGET_OBSERVATION_READY)
|
||||||
add_library(target_observation_processing STATIC
|
add_library(target_observation_processing STATIC
|
||||||
src/target_observation_processing.cpp
|
src/target_observation_processing.cpp
|
||||||
${TARGET_PREDICTION_DEPLOY_DIR}/YOLOs-CPP-TensorRT/include/yolos/core/cuda_preprocessing.cu
|
${TARGET_PREDICTION_THIRDPARTY_DIR}/YOLOs-CPP-TensorRT/include/yolos/core/cuda_preprocessing.cu
|
||||||
)
|
)
|
||||||
target_include_directories(target_observation_processing PUBLIC
|
target_include_directories(target_observation_processing PUBLIC
|
||||||
include
|
include
|
||||||
${TARGET_PREDICTION_DEPLOY_DIR}/YOLOs-CPP-TensorRT/include
|
${TARGET_PREDICTION_THIRDPARTY_DIR}/YOLOs-CPP-TensorRT/include
|
||||||
${TENSORRT_INCLUDE_DIR}
|
${TENSORRT_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
target_link_libraries(target_observation_processing
|
target_link_libraries(target_observation_processing
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import os
|
|||||||
import yaml
|
import yaml
|
||||||
from ament_index_python.packages import get_package_share_directory
|
from ament_index_python.packages import get_package_share_directory
|
||||||
from launch import LaunchDescription
|
from launch import LaunchDescription
|
||||||
from launch.actions import DeclareLaunchArgument
|
from launch.actions import DeclareLaunchArgument, SetEnvironmentVariable
|
||||||
from launch.substitutions import LaunchConfiguration
|
from launch.substitutions import LaunchConfiguration
|
||||||
from launch_ros.actions import Node
|
from launch_ros.actions import Node
|
||||||
|
|
||||||
@@ -78,6 +78,7 @@ def generate_launch_description():
|
|||||||
|
|
||||||
# Create launch description
|
# Create launch description
|
||||||
ld = LaunchDescription()
|
ld = LaunchDescription()
|
||||||
|
ld.add_action(SetEnvironmentVariable('RCUTILS_COLORIZED_OUTPUT', '1'))
|
||||||
ld.add_action(config_file_arg)
|
ld.add_action(config_file_arg)
|
||||||
ld.add_action(rviz_config_arg) # Add RViz configuration argument
|
ld.add_action(rviz_config_arg) # Add RViz configuration argument
|
||||||
ld.add_action(host_sdk_node)
|
ld.add_action(host_sdk_node)
|
||||||
|
|||||||
@@ -40,6 +40,11 @@ std::filesystem::path get_package_source_directory_from_file()
|
|||||||
return std::filesystem::path(__FILE__).parent_path().parent_path();
|
return std::filesystem::path(__FILE__).parent_path().parent_path();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::filesystem::path get_target_prediction_root_directory()
|
||||||
|
{
|
||||||
|
return get_package_source_directory_from_file().parent_path().parent_path().parent_path().parent_path();
|
||||||
|
}
|
||||||
|
|
||||||
std::string format_vector3f(const Eigen::Vector3f& value)
|
std::string format_vector3f(const Eigen::Vector3f& value)
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
@@ -184,11 +189,11 @@ CloudReprojectionRosNode::CloudReprojectionRosNode(const rclcpp::NodeOptions& op
|
|||||||
void CloudReprojectionRosNode::loadParameters()
|
void CloudReprojectionRosNode::loadParameters()
|
||||||
{
|
{
|
||||||
const auto package_path = get_package_source_directory_from_file();
|
const auto package_path = get_package_source_directory_from_file();
|
||||||
const auto workspace_src_path = package_path.parent_path().parent_path().parent_path();
|
const auto target_prediction_root = get_target_prediction_root_directory();
|
||||||
const auto default_yolo_engine =
|
const auto default_yolo_engine =
|
||||||
(workspace_src_path / "TargetPrediction" / "deploy" / "model" / "yolo26s-pose.trt").string();
|
(target_prediction_root / "deploy" / "model" / "yolo26s-pose.trt").string();
|
||||||
const auto default_yolo_labels =
|
const auto default_yolo_labels =
|
||||||
(workspace_src_path / "TargetPrediction" / "deploy" / "YOLOs-CPP-TensorRT" / "models" / "coco.names").string();
|
(target_prediction_root / "thirdparty" / "YOLOs-CPP-TensorRT" / "models" / "coco.names").string();
|
||||||
|
|
||||||
// Declare and get parameters
|
// Declare and get parameters
|
||||||
this->declare_parameter<std::string>("cloud_slam_topic", "/odin1/cloud_slam");
|
this->declare_parameter<std::string>("cloud_slam_topic", "/odin1/cloud_slam");
|
||||||
|
|||||||
Reference in New Issue
Block a user