From: Walter Fetter Lages Date: Tue, 29 Sep 2026 19:49:00 +0000 (-0300) Subject: Port to Lyrical. X-Git-Url: http://git.ece.ufrgs.br/?a=commitdiff_plain;h=HEAD;p=trajectory_conversions.git Port to Lyrical. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0722782..b188092 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.20) project(trajectory_conversions) if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") @@ -21,31 +21,31 @@ add_executable(pose_stamped2joint src/pose_stamped2joint.cpp) target_include_directories(pose_stamped2joint PUBLIC $ $) -target_compile_features(pose_stamped2joint PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17 -ament_target_dependencies( +target_compile_features(pose_stamped2joint PUBLIC c_std_17 cxx_std_20) # Require C17 and C++20 +target_link_libraries( pose_stamped2joint - "rclcpp" - "std_msgs" - "geometry_msgs" - "tf2_msgs" - "trajectory_msgs" - "urdf" - "tf2_kdl" - "kdl_parser" - "orocos_kdl" + ${rclcpp_TARGETS} + ${std_msgs_TARGETS} + ${geometry_msgs_TARGETS} + ${tf2_msgs_TARGETS} + ${trajectory_msgs_TARGETS} + ${urdf_TARGETS} + ${tf2_kdl_TARGETS} + ${kdl_parser_TARGETS} + ${orocos_kdl_TARGETS} ) add_executable(pose_stamped2tf src/pose_stamped2tf.cpp) target_include_directories(pose_stamped2tf PUBLIC $ $) -target_compile_features(pose_stamped2tf PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17 -ament_target_dependencies( +target_compile_features(pose_stamped2tf PUBLIC c_std_17 cxx_std_20) # Require C17 and C++20 +target_link_libraries( pose_stamped2tf - "rclcpp" - "geometry_msgs" - "tf2_msgs" - "tf2_kdl" + ${rclcpp_TARGETS} + ${geometry_msgs_TARGETS} + ${tf2_msgs_TARGETS} + ${tf2_kdl_TARGETS} ) install(TARGETS pose_stamped2joint pose_stamped2tf diff --git a/package.xml b/package.xml index 6b59087..8a90105 100644 --- a/package.xml +++ b/package.xml @@ -2,7 +2,7 @@ trajectory_conversions - 2.1.0 + 2.2.0 Trajectory conversions Walter Fetter Lages GPL-3.0-only diff --git a/src/pose_stamped2joint.cpp b/src/pose_stamped2joint.cpp index 51af4e0..944ee16 100644 --- a/src/pose_stamped2joint.cpp +++ b/src/pose_stamped2joint.cpp @@ -1,7 +1,7 @@ /* pose_stamped2joint: A ROS 2 node to map Cartesian pose to joint space - Copyright (c) 2018, 2021 Walter Fetter Lages + Copyright (c) 2018..2026 Walter Fetter Lages This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -54,10 +54,11 @@ Pose2Joint::Pose2Joint(const std::string &name,const std::string &root,const std rclcpp::QoS qos(rclcpp::KeepLast(1)); qos.transient_local(); auto robotDescriptionSubscriber_=create_subscription("robot_description",qos,std::bind(&Pose2Joint::robotDescriptionCB,this,std::placeholders::_1)); + rclcpp::executors::SingleThreadedExecutor executor; while(robotDescription_.empty()) { RCLCPP_WARN_STREAM_SKIPFIRST_THROTTLE(get_logger(),*get_clock(),1000,"Waiting for robot model on /robot_description."); - rclcpp::spin_some(get_node_base_interface()); + executor.spin_node_some(get_node_base_interface()); } KDL::Tree tree;