diff --git a/uROS_Agent/CMakeLists.txt b/uROS_Agent/CMakeLists.txt index ec0182f..368b5ba 100644 --- a/uROS_Agent/CMakeLists.txt +++ b/uROS_Agent/CMakeLists.txt @@ -247,7 +247,7 @@ endif() #Install install( FILES "${_DEFAULT_FASTRTPS_PROFILES_PATH}" - DESTINATION "../microxrcedds_agent/bin" + DESTINATION lib/${PROJECT_NAME} ) diff --git a/uROS_Agent/resource/StaticValues.xml b/uROS_Agent/resource/StaticValues.xml index 1c0e831..4d9c1ab 100644 --- a/uROS_Agent/resource/StaticValues.xml +++ b/uROS_Agent/resource/StaticValues.xml @@ -1,6 +1,6 @@ - + - default_xrce_participant + participant_profile @@ -21,4 +21,4 @@ WITH_KEY Square ShapeType - + \ No newline at end of file diff --git a/uROS_Agent/resource/rclcpp.xml b/uROS_Agent/resource/rclcpp.xml new file mode 100644 index 0000000..54a4c50 --- /dev/null +++ b/uROS_Agent/resource/rclcpp.xml @@ -0,0 +1,29 @@ + + rt/parameter_events + rcl_interfaces::msg::dds_::ParameterEvent_ + + + rt/clock + rosgraph_msgs::msg::dds_::Clock_ + + + + NO_KEY + rt/parameter_events + rcl_interfaces::msg::dds_::ParameterEvent_ + + + + + NO_KEY + rt/clock + rosgraph_msgs::msg::dds_::Clock_ + + + + + NO_KEY + rt/parameter_events + rcl_interfaces::msg::dds_::ParameterEvent_ + + \ No newline at end of file diff --git a/uROS_Agent/src/main.cpp b/uROS_Agent/src/main.cpp index 0d412f6..e9d986f 100644 --- a/uROS_Agent/src/main.cpp +++ b/uROS_Agent/src/main.cpp @@ -16,13 +16,18 @@ #ifdef _WIN32 #include #include -#else + +#elif __unix__ +#include +#include + #include #include #include #include #include -#endif //_WIN32 +#endif + #include #include #include @@ -84,9 +89,18 @@ private: int main(int argc, char** argv) { + +#ifdef __unix__ + char exe_path[200]; + ssize_t count = readlink("/proc/self/exe", exe_path, sizeof(exe_path)); + if (count != -1) { + chdir(dirname(exe_path)); + } +#endif + bool initialized = false; -#ifndef _WIN32 +#ifdef __unix__ if(argc == 2 && (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0)) { showHelp(); @@ -218,7 +232,7 @@ int main(int argc, char** argv) { initializationError(); } -#else +#elif _WIN32 (void) argc; (void) argv;