From 2a0268a7430a4152a4e4b6d6f8731a77fc94c4f8 Mon Sep 17 00:00:00 2001 From: Zixing Jiang Date: Tue, 22 Oct 2024 10:41:27 +0800 Subject: [PATCH] Get the `robot_description` from the controller's base class for _Jazzy_ --- cartesian_controller_handles/src/motion_control_handle.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cartesian_controller_handles/src/motion_control_handle.cpp b/cartesian_controller_handles/src/motion_control_handle.cpp index 5239b9f..29c28fb 100644 --- a/cartesian_controller_handles/src/motion_control_handle.cpp +++ b/cartesian_controller_handles/src/motion_control_handle.cpp @@ -141,7 +141,11 @@ MotionControlHandle::on_configure(const rclcpp_lifecycle::State & previous_state urdf::Model robot_model; KDL::Tree robot_tree; +#if defined CARTESIAN_CONTROLLERS_JAZZY + std::string robot_description = this->get_robot_description(); +#else std::string robot_description = get_node()->get_parameter("robot_description").as_string(); +#endif if (robot_description.empty()) { RCLCPP_ERROR(get_node()->get_logger(), "robot_description is empty");