diff --git a/moveit_core/exceptions/CMakeLists.txt b/moveit_core/exceptions/CMakeLists.txt index 6b80cf3c28..eae26725ab 100644 --- a/moveit_core/exceptions/CMakeLists.txt +++ b/moveit_core/exceptions/CMakeLists.txt @@ -3,9 +3,9 @@ set(MOVEIT_LIB_NAME moveit_exceptions) add_library(${MOVEIT_LIB_NAME} src/exceptions.cpp) set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}") -target_link_libraries(${MOVEIT_LIB_NAME} ${catkin_LIBRARIES} ${urdfdom_LIBRARIES} ${urdfdom_headers_LIBRARIES} ${Boost_LIBRARIES}) +target_link_libraries(${MOVEIT_LIB_NAME} ${rclcpp_LIBRARIES} ${rmw_implementation_LIBRARIES} ${urdfdom_LIBRARIES} ${urdfdom_headers_LIBRARIES} ${Boost_LIBRARIES}) install(TARGETS ${MOVEIT_LIB_NAME} - LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}) -install(DIRECTORY include/ DESTINATION ${CATKIN_GLOBAL_INCLUDE_DESTINATION}) + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) +install(DIRECTORY include/ DESTINATION include) diff --git a/moveit_core/exceptions/src/exceptions.cpp b/moveit_core/exceptions/src/exceptions.cpp index 864d615331..1b621bab11 100644 --- a/moveit_core/exceptions/src/exceptions.cpp +++ b/moveit_core/exceptions/src/exceptions.cpp @@ -35,14 +35,18 @@ /* Author: Acorn Pooley, Ioan Sucan */ #include -#include +#include +#include "rclcpp/rclcpp.hpp" + +// Logger +rclcpp::Logger logger_exceptions = rclcpp::get_logger("exceptions"); moveit::ConstructException::ConstructException(const std::string& what_arg) : std::runtime_error(what_arg) { - ROS_ERROR_NAMED("exceptions", "Error during construction of object: %s\nException thrown.", what_arg.c_str()); + RCLCPP_ERROR(logger_exceptions, "Error during construction of object: %s\nException thrown.", what_arg.c_str()); } moveit::Exception::Exception(const std::string& what_arg) : std::runtime_error(what_arg) { - ROS_ERROR_NAMED("exceptions", "%s\nException thrown.", what_arg.c_str()); + RCLCPP_ERROR(logger_exceptions, "%s\nException thrown.", what_arg.c_str()); }