diff --git a/src/drone_sensors/CMakeLists.txt b/src/drone_sensors/CMakeLists.txt deleted file mode 100644 index 7368ee75..00000000 --- a/src/drone_sensors/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(drone_sensors) - -if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") - add_compile_options(-Wall -Wextra -Wpedantic) -endif() - -# find dependencies -find_package(ament_cmake REQUIRED) -# uncomment the following section in order to fill in -# further dependencies manually. -# find_package( REQUIRED) -find_package(rclcpp REQUIRED) -find_package(std_msgs REQUIRED) - -# add executable so that the node can be run with ros2 run -add_executable(height_sensor src/height_sensor.cpp) -ament_target_dependencies(height_sensor rclcpp std_msgs) - -# add install targets section so ros2 run can find the executable -install(TARGETS -height_sensor -DESTINATION lib/${PROJECT_NAME}) - -if(BUILD_TESTING) - find_package(ament_lint_auto REQUIRED) - # the following line skips the linter which checks for copyrights - # comment the line when a copyright and license is added to all source files - set(ament_cmake_copyright_FOUND TRUE) - # the following line skips cpplint (only works in a git repo) - # comment the line when this package is in a git repo and when - # a copyright and license is added to all source files - set(ament_cmake_cpplint_FOUND TRUE) - ament_lint_auto_find_test_dependencies() -endif() - -ament_package() diff --git a/src/drone_sensors/package.xml b/src/drone_sensors/package.xml deleted file mode 100644 index a2ba2a45..00000000 --- a/src/drone_sensors/package.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - drone_sensors - 0.0.0 - package for the environment sensors of the 5G drone (height meter, object detection) - Sem van der Hoeven - Apache License 2.0 - - ament_cmake - - rclcpp - std_msgs - - ament_lint_auto - ament_lint_common - - - ament_cmake - - diff --git a/src/drone_sensors/src/height_sensor.cpp b/src/drone_sensors/src/height_sensor.cpp deleted file mode 100644 index 909c558a..00000000 --- a/src/drone_sensors/src/height_sensor.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include //time measurement - -#include "rclcpp/rclcpp.hpp" -#include "std_msgs/msg/string.hpp" - -using namespace std::chrono_literals; - -class HeightSensorPublisher : public rclcpp::Node -{ - public: - HeightSensorPublisher() : Node("height_sensor_publisher") - { - publisher_ = this->create_publisher("height_sensor", 10); - timer_ = this->create_wall_timer( - 500ms, std::bind(&HeightSensorPublisher::timer_callback, this)); - - } - private: - void timer_callback() - { - auto message = std_msgs::msg::String(); - message.data = "Hello heigth sensor!"; - RCLCPP_INFO(this->get_logger(), "Publishing: %s", message.data.c_str()); - publisher_->publish(message); - } - rclcpp::TimerBase::SharedPtr timer_; - rclcpp::Publisher::SharedPtr publisher_; -}; - -int main(int argc, char *argv[]) -{ - rclcpp::init(argc,argv); - rclcpp::spin(std::make_shared()); - rclcpp::shutdown(); - - return 0; -} - -