From ddfe67fc4552765f5c39bb782b2ef80cb4f39777 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Wed, 16 Jan 2019 20:44:07 +0300 Subject: [PATCH] Remove unused fcu_horiz nodelet --- clever/CMakeLists.txt | 5 ----- clever/src/fcu_horiz.cpp | 40 ---------------------------------------- 2 files changed, 45 deletions(-) delete mode 100644 clever/src/fcu_horiz.cpp diff --git a/clever/CMakeLists.txt b/clever/CMakeLists.txt index 6ce7ec76..11119ac6 100644 --- a/clever/CMakeLists.txt +++ b/clever/CMakeLists.txt @@ -188,11 +188,6 @@ target_link_libraries(clever ${catkin_LIBRARIES} ) -target_link_libraries(fcu_horiz - ${catkin_LIBRARIES} - "/opt/ros/kinetic/lib/libtf2_ros.so" -) - target_link_libraries(aruco_vpe ${catkin_LIBRARIES} ) diff --git a/clever/src/fcu_horiz.cpp b/clever/src/fcu_horiz.cpp deleted file mode 100644 index aa17c1e3..00000000 --- a/clever/src/fcu_horiz.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include -#include -#include -#include - -#include "util.h" - -class FcuHoriz : public nodelet::Nodelet -{ - geometry_msgs::TransformStamped t_; - - void handlePose(const geometry_msgs::PoseStampedConstPtr& msg) - { - static tf2_ros::TransformBroadcaster br; - double roll, pitch, yaw; - - t_.header.stamp = msg->header.stamp; - t_.header.frame_id = msg->header.frame_id; - t_.transform.translation.x = msg->pose.position.x; - t_.transform.translation.y = msg->pose.position.y; - t_.transform.translation.z = msg->pose.position.z; - - // Warning: this is not thead-safe - quaternionToEuler(msg->pose.orientation, roll, pitch, yaw); - eulerToQuaternion(t_.transform.rotation, 0, 0, yaw); - - br.sendTransform(t_); - } - - void onInit() - { - t_.child_frame_id = "fcu_horiz"; - t_.transform.rotation.w = 1; - static ros::Subscriber pose_sub = getNodeHandle().subscribe("mavros/local_position/pose", 1, &FcuHoriz::handlePose, this); - ROS_INFO("fcu_horiz initialized"); - } -}; - -PLUGINLIB_EXPORT_CLASS(FcuHoriz, nodelet::Nodelet)