diff --git a/.github/workflows/build_base_images.yml b/.github/workflows/build_base_images.yml index 094357d0..ac08006d 100644 --- a/.github/workflows/build_base_images.yml +++ b/.github/workflows/build_base_images.yml @@ -17,7 +17,9 @@ jobs: uses: actions/checkout@v4 - name: Setup Watod Environment - run: ./watod_scripts/watod-setup-env.sh + run: | + MODULES_DIR="$GITHUB_WORKSPACE/modules" + . ./watod_scripts/watod-setup-env.sh shell: bash - name: Generate Docker Environment diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..89818293 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/perception/lane_detection/src/lane_detection_tensorrt"] + path = src/perception/lane_detection/src/lane_detection_tensorrt + url = git@github.com:WATonomous/lane_detection_tensorrt.git diff --git a/docker/base/inject_wato_base.Dockerfile b/docker/base/inject_wato_base.Dockerfile index 118bf5b5..61c0d89f 100644 --- a/docker/base/inject_wato_base.Dockerfile +++ b/docker/base/inject_wato_base.Dockerfile @@ -5,12 +5,15 @@ ARG GENERIC_IMAGE # for the wato_monorepo. FROM ${GENERIC_IMAGE} as wato_base -ENV DEBIAN_FRONTEND noninteractive +RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ + apt-get install -y curl sudo && \ + rm -rf /var/lib/apt/lists/* + ENV USER="bolty" ENV AMENT_WS=/home/${USER}/ament_ws # User Setup -RUN apt-get update && apt-get install -y curl sudo && \ +RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y curl sudo && \ rm -rf /var/lib/apt/lists/* # Add a user so that created files in the docker container are owned by a non-root user (for prod) @@ -19,14 +22,14 @@ RUN addgroup --gid 1000 ${USER} && \ useradd -rm -d /home/${USER} -s /bin/bash -g ${USER} -G sudo -u 1000 ${USER} -p "$(openssl passwd -6 $USER_PASSWD)" # install apt-fast -RUN apt-get -qq update && \ +RUN DEBIAN_FRONTEND=noninteractive apt-get -qq update && \ apt-get install -qq -y wget && \ mkdir -p /etc/apt/keyrings && \ wget -O - "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xA2166B8DE8BDC3367D1901C11EE2FF37CA8DA16B" \ | gpg --dearmor -o /etc/apt/keyrings/apt-fast.gpg && \ echo "deb [signed-by=/etc/apt/keyrings/apt-fast.gpg] \ http://ppa.launchpad.net/apt-fast/stable/ubuntu focal main" > /etc/apt/sources.list.d/apt-fast.list && \ - apt-get update -qq && apt-get install -qq -y apt-fast && \ + DEBIAN_FRONTEND=noninteractive apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -qq -y apt-fast && \ echo debconf apt-fast/maxdownloads string 16 | debconf-set-selections && \ echo debconf apt-fast/dlflag boolean true | debconf-set-selections && \ echo debconf apt-fast/aptmanager string apt-get | debconf-set-selections diff --git a/docker/perception/lane_detection/lane_detection.Dockerfile b/docker/perception/lane_detection/lane_detection.Dockerfile index 2fa97918..73aea4b6 100644 --- a/docker/perception/lane_detection/lane_detection.Dockerfile +++ b/docker/perception/lane_detection/lane_detection.Dockerfile @@ -1,5 +1,5 @@ -ARG BASE_IMAGE=ghcr.io/watonomous/wato_monorepo/base:humble-ubuntu22.04 - +ARG BASE_IMAGE=ghcr.io/watonomous/wato_monorepo/base:cuda12.2-humble-ubuntu22.04-devel +ARG RUNTIME_IMAGE=ghcr.io/watonomous/wato_monorepo/base:cuda12.2-humble-ubuntu22.04 ################################ Source ################################ FROM ${BASE_IMAGE} as source @@ -7,7 +7,7 @@ WORKDIR ${AMENT_WS}/src # Copy in source code COPY src/perception/lane_detection lane_detection -COPY src/wato_msgs/sample_msgs sample_msgs +COPY src/wato_msgs/perception_msgs/lane_detection_msgs lane_detection_msgs # Scan for rosdeps RUN apt-get -qq update && rosdep update && \ @@ -19,6 +19,13 @@ RUN apt-get -qq update && rosdep update && \ ################################# Dependencies ################################ FROM ${BASE_IMAGE} as dependencies +RUN apt-get update && apt-get install -y libopencv-dev \ + python3-opencv \ + tensorrt \ + cuda-toolkit + +RUN export OpenCV_DIR=/usr/lib/x86_64-linux-gnu/cmake/opencv4/OpenCVConfig.cmake + # Install Rosdep requirements COPY --from=source /tmp/colcon_install_list /tmp/colcon_install_list RUN apt-fast install -qq -y --no-install-recommends $(cat /tmp/colcon_install_list) @@ -46,7 +53,21 @@ COPY docker/wato_ros_entrypoint.sh ${AMENT_WS}/wato_ros_entrypoint.sh ENTRYPOINT ["./wato_ros_entrypoint.sh"] ################################ Prod ################################ -FROM build as deploy +# Use a different runtime image for a smaller image size +FROM ${RUNTIME_IMAGE} as deploy + +# Install runtime libs +RUN apt-get update && apt-get install -y \ + ros-humble-cv-bridge \ + tensorrt + +# Copy the compiled binary to the runtime image +COPY --from=build ${AMENT_WS} ${AMENT_WS} + +WORKDIR ${AMENT_WS} + +COPY docker/wato_ros_entrypoint.sh ${AMENT_WS}/wato_ros_entrypoint.sh +ENTRYPOINT ["./wato_ros_entrypoint.sh"] # Source Cleanup and Security Setup RUN chown -R $USER:$USER ${AMENT_WS} diff --git a/docker/perception/radar_object_detection/radar_object_detection.Dockerfile b/docker/perception/radar_object_detection/radar_object_detection.Dockerfile index 82aeb8c8..6329d177 100644 --- a/docker/perception/radar_object_detection/radar_object_detection.Dockerfile +++ b/docker/perception/radar_object_detection/radar_object_detection.Dockerfile @@ -7,7 +7,7 @@ WORKDIR ${AMENT_WS}/src # Copy in source code COPY src/perception/radar_object_detection radar_object_detection -COPY src/wato_msgs/radar_msgs radar_msgs +COPY src/wato_msgs/perception_msgs/radar_msgs radar_msgs # Scan for rosdeps RUN apt-get -qq update && rosdep update && \ diff --git a/docs/setup/setup.md b/docs/setup/setup.md index 9f4c8f21..03c3b78b 100644 --- a/docs/setup/setup.md +++ b/docs/setup/setup.md @@ -27,7 +27,7 @@ Note: These are all available on WATonomous servers by default. ## Running Your First Program in the Monorepo These steps will let you run our sample nodes module. To run other modules, refer to our modules documentation. -1. Clone this repo onto the host machine by using `$ git clone git@github.com:WATonomous/wato_monorepo.git`. We recommend you clone the repo into your home directory, `~` +1. Clone this repo onto the host machine by using `$ git clone --recurse-submodules git@github.com:WATonomous/wato_monorepo.git`. The `--recurse-submodules` flag is needed to initialize submodules required by the repo - if you did not clone with this flag, run `git submodule update --init --recursive` inside the repo. We recommend you clone the repo into your home directory, `~` 2. Login to the our container registry by using `docker login ghcr.io`. Provide your GitHub Username and GitHub Token. 3. Configure to only run our sample nodes by uncommenting and setting `ACTIVE_MODULES="samples"` in `watod-config.sh` 4. Run `$ ./watod pull` to pull latest docker images from our container registry. diff --git a/modules/docker-compose.perception.yaml b/modules/docker-compose.perception.yaml index 5eff3cb8..ecc82108 100644 --- a/modules/docker-compose.perception.yaml +++ b/modules/docker-compose.perception.yaml @@ -66,7 +66,16 @@ services: - "${PERCEPTION_LANE_DETECTION_IMAGE}:build_main" target: deploy image: "${PERCEPTION_LANE_DETECTION_IMAGE}:${TAG}" - command: /bin/bash -c "ros2 launch lane_detection lane_detection.launch.py" + command: /bin/bash -c "ros2 launch lane_detection eve.launch.py" + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: [gpu] + volumes: + - /mnt/wato-drive2/perception-weights/tensorrt_model/ultra_fast_lane_detection_v2/resource/model/ufldv2_culane_res34_320x1600.onnx:/models/ufldv2_culane_res34_320x1600.onnx tracking: build: diff --git a/src/perception/lane_detection/CMakeLists.txt b/src/perception/lane_detection/CMakeLists.txt index b3cfae5d..084ff19f 100644 --- a/src/perception/lane_detection/CMakeLists.txt +++ b/src/perception/lane_detection/CMakeLists.txt @@ -1,14 +1,70 @@ cmake_minimum_required(VERSION 3.8) -project(lane_detection) +set(ProjectName "lane_detection") +set(CUDA_TOOLKIT_ROOT_DIR "/usr/local/cuda") +SET(CMAKE_CUDA_COMPILER /usr/local/cuda-12.2/bin/nvcc) +SET(CUDACXX /usr/local/cuda-12.2/bin/nvcc) +project(${ProjectName} LANGUAGES CXX CUDA) + +# Default to C++14 +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 14) +endif() 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) +### TensorRT model ### + +# Select build system and set compile options +include(${CMAKE_CURRENT_LIST_DIR}/src/lane_detection_tensorrt/common_helper/cmakes/build_setting.cmake) +add_executable(lane_detection src/lane_detection_node.cpp) + +add_subdirectory(./src/lane_detection_tensorrt/ultra_fast_lane_detection_v2/image_processor image_processor) +target_include_directories(${ProjectName} PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/include + ./src/lane_detection_tensorrt/ultra_fast_lane_detection_v2/image_processor) +target_link_libraries(${ProjectName} ImageProcessor) + +find_package(OpenCV REQUIRED) +target_include_directories(${ProjectName} PUBLIC ${OpenCV_INCLUDE_DIRS}) +target_link_libraries(${ProjectName} ${OpenCV_LIBS}) + +# Copy resouce +add_definitions(-DRESOURCE_DIR="/models/") + +### End of TensorRT model ### + +set(REQUIRED_PACKAGES + rclcpp + std_msgs + sensor_msgs + geometry_msgs + lane_detection_msgs + cv_bridge + image_transport + CUDA +) + +foreach(PKG IN LISTS REQUIRED_PACKAGES) + find_package(${PKG} REQUIRED) +endforeach() + +# Install launch files +install(DIRECTORY + launch + DESTINATION share/${PROJECT_NAME}/ +) + +# Install config files +install(DIRECTORY + config + DESTINATION share/${PROJECT_NAME}/ +) + +install(TARGETS +lane_detection + DESTINATION lib/${PROJECT_NAME}) +ament_target_dependencies(lane_detection rclcpp OpenCV std_msgs sensor_msgs cv_bridge image_transport lane_detection_msgs) ament_package() diff --git a/src/perception/lane_detection/config/eve_config.yaml b/src/perception/lane_detection/config/eve_config.yaml new file mode 100644 index 00000000..5706f42d --- /dev/null +++ b/src/perception/lane_detection/config/eve_config.yaml @@ -0,0 +1,9 @@ +lane_detection_node: + ros__parameters: + camera_topic: /camera/left/image_color + publish_vis_topic: /camera/left/lanes_viz + publish_lanes_topic: /camera/left/lanes + save_images: false + save_images_path: /tmp + publish_source_image: false + debug_node: false diff --git a/src/perception/lane_detection/config/nuscenes_config.yaml b/src/perception/lane_detection/config/nuscenes_config.yaml new file mode 100644 index 00000000..e526dbaf --- /dev/null +++ b/src/perception/lane_detection/config/nuscenes_config.yaml @@ -0,0 +1,9 @@ +lane_detection_node: + ros__parameters: + camera_topic: /CAM_FRONT/image_rect_compressed + publish_vis_topic: /CAM_FRONT/lanes_viz + publish_lanes_topic: /CAM_FRONT/lanes + save_images: false + save_images_path: /tmp + publish_source_image: false + debug_node: false diff --git a/src/perception/lane_detection/include/lane_detection_node.hpp b/src/perception/lane_detection/include/lane_detection_node.hpp new file mode 100644 index 00000000..efa73639 --- /dev/null +++ b/src/perception/lane_detection/include/lane_detection_node.hpp @@ -0,0 +1,48 @@ +#ifndef LANE_DETECTION_NODE_HPP +#define LANE_DETECTION_NODE_HPP + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include "lane_detection_msgs/msg/lane_detection.hpp" + +#include + +#include "common_helper_cv.h" +#include "image_processor.h" + +class LaneDetectionNode : public rclcpp::Node { + public: + LaneDetectionNode(); + void image_callback(const sensor_msgs::msg::Image::ConstSharedPtr &msg); + + private: + void populate_lane_msg(lane_detection_msgs::msg::LaneDetection &lane_msg, + const std::vector> &raw_lane_list); + void save_image(const cv::Mat &image, const std::string &filename); + + rclcpp::Subscription::SharedPtr subscription_; + rclcpp::Publisher::SharedPtr image_pub_; + rclcpp::Publisher::SharedPtr lane_detection_pub_; + + size_t count_; + + // ROS Parameters + std::string camera_topic_; + std::string publish_vis_topic_; + std::string publish_lanes_topic_; + bool save_images_; + std::string save_dir_; + bool publish_source_image_; + // Debug will publish the source image with lane detection overlay + bool debug_node_; +}; + +#endif // LANE_DETECTION_NODE_HPP \ No newline at end of file diff --git a/src/perception/lane_detection/launch/eve.launch.py b/src/perception/lane_detection/launch/eve.launch.py new file mode 100644 index 00000000..8dbeb7cf --- /dev/null +++ b/src/perception/lane_detection/launch/eve.launch.py @@ -0,0 +1,26 @@ +from launch import LaunchDescription +from launch_ros.actions import Node +from ament_index_python.packages import get_package_share_directory +import os + + +def generate_launch_description(): + ld = LaunchDescription() + + config = os.path.join( + get_package_share_directory('lane_detection'), + 'config', + 'eve_config.yaml' + ) + + lane_detection_node = Node( + package='lane_detection', + executable='lane_detection', + name='lane_detection_node', + parameters=[config], + arguments=['--ros-args', '--log-level', 'info'] + ) + + ld.add_action(lane_detection_node) + + return ld diff --git a/src/perception/lane_detection/launch/nuscenes.launch.py b/src/perception/lane_detection/launch/nuscenes.launch.py new file mode 100644 index 00000000..74c839fa --- /dev/null +++ b/src/perception/lane_detection/launch/nuscenes.launch.py @@ -0,0 +1,26 @@ +from launch import LaunchDescription +from launch_ros.actions import Node +from ament_index_python.packages import get_package_share_directory +import os + + +def generate_launch_description(): + ld = LaunchDescription() + + config = os.path.join( + get_package_share_directory('lane_detection'), + 'config', + 'nuscenes_config.yaml' + ) + + lane_detection_node = Node( + package='lane_detection', + executable='lane_detection', + name='lane_detection_node', + parameters=[config], + arguments=['--ros-args', '--log-level', 'info'] + ) + + ld.add_action(lane_detection_node) + + return ld diff --git a/src/perception/lane_detection/package.xml b/src/perception/lane_detection/package.xml index 90308912..c6a2ee45 100644 --- a/src/perception/lane_detection/package.xml +++ b/src/perception/lane_detection/package.xml @@ -3,12 +3,24 @@ lane_detection 0.0.0 - TODO: Package description - bolty + Lane Detection using ultra-fast-lane-detection_v2 + Justin Leung + Steven Gong TODO: License declaration ament_cmake + sensor_msgs + geometry_msgs + lane_detection_msgs + std_msgs + cv_bridge + image_transport + + rosidl_default_generators + rosidl_default_runtime + rosidl_interface_packages + ament_cmake diff --git a/src/perception/lane_detection/src/lane_detection_node.cpp b/src/perception/lane_detection/src/lane_detection_node.cpp new file mode 100755 index 00000000..3ae668bd --- /dev/null +++ b/src/perception/lane_detection/src/lane_detection_node.cpp @@ -0,0 +1,157 @@ +#include +#include +#include +#include +#include + +#include +#include +#include +#include "image_transport/image_transport.hpp" +#include "rclcpp/rclcpp.hpp" + +#include "lane_detection_msgs/msg/lane_detection.hpp" +#include "lane_detection_node.hpp" +#include "lane_engine.h" +#include "std_msgs/msg/string.hpp" + +#include + +#include "common_helper_cv.h" +#include "image_processor.h" + +LaneDetectionNode::LaneDetectionNode() : Node("lane_detection"), count_(0) { + this->declare_parameter("camera_topic", "/CAM_FRONT/image_rect_compressed"); + this->declare_parameter("publish_vis_topic", "/CAM_FRONT/lanes_viz"); + this->declare_parameter("publish_lanes_topic", "/CAM_FRONT/lanes"); + this->declare_parameter("save_images", false); + this->declare_parameter("save_dir", "/tmp"); + this->declare_parameter("publish_source_image", false); + this->declare_parameter("debug_node", false); + + this->get_parameter("camera_topic", camera_topic_); + this->get_parameter("publish_vis_topic", publish_vis_topic_); + this->get_parameter("publish_lanes_topic", publish_lanes_topic_); + this->get_parameter("save_images", save_images_); + this->get_parameter("save_dir", save_dir_); + this->get_parameter("publish_source_image", publish_source_image_); + this->get_parameter("debug_node", debug_node_); + + if (!std::filesystem::exists(save_dir_)) { + std::filesystem::create_directories(save_dir_); + } + + RCLCPP_INFO(this->get_logger(), "Subscribing to camera topic: %s", camera_topic_.c_str()); + + subscription_ = this->create_subscription( + camera_topic_, 10, + std::bind(&LaneDetectionNode::image_callback, this, std::placeholders::_1)); + + lane_detection_pub_ = + this->create_publisher(publish_lanes_topic_, 10); + + if (debug_node_) { + RCLCPP_INFO(this->get_logger(), "Creating debug publisher topic: %s", + publish_vis_topic_.c_str()); + image_pub_ = this->create_publisher(publish_vis_topic_, 10); + } +} + +void LaneDetectionNode::save_image(const cv::Mat &image, const std::string &filename) { + cv::imwrite(filename, image); + RCLCPP_INFO(this->get_logger(), "Saved image to %s", filename.c_str()); +} + +void LaneDetectionNode::populate_lane_msg(lane_detection_msgs::msg::LaneDetection &lane_msg, + const std::vector> &raw_lane_list) { + lane_msg.header.stamp = this->now(); + lane_msg.header.frame_id = "lane_detection"; + lane_msg.lines.clear(); + + // Load the message from the raw lane list + for (size_t i = 0; i < raw_lane_list.size(); i++) { + lane_detection_msgs::msg::LaneLine line; + line.points.resize(raw_lane_list[i].size()); + for (size_t j = 0; j < raw_lane_list[i].size() / 2; j++) { + line.points[j].x = raw_lane_list[i][j * 2 + 0]; + line.points[j].y = raw_lane_list[i][j * 2 + 1]; + line.points[j].z = 0; + } + lane_msg.lines.push_back(line); + } +} + +void LaneDetectionNode::image_callback(const sensor_msgs::msg::Image::ConstSharedPtr &msg) { + cv_bridge::CvImagePtr cv_ptr; + try { + cv_ptr = cv_bridge::toCvCopy(msg, sensor_msgs::image_encodings::BGR8); + } catch (cv_bridge::Exception &e) { + RCLCPP_ERROR(this->get_logger(), "cv_bridge exception: %s", e.what()); + return; + } + + cv::Mat image = cv_ptr->image; + + if (image.empty()) { + RCLCPP_ERROR(this->get_logger(), "Decoded image is empty!"); + return; + } + RCLCPP_INFO(this->get_logger(), "Got Decoded image: width=%d, height=%d, type=%d", image.cols, + image.rows, image.type()); + + RCLCPP_INFO(this->get_logger(), "=== Start frame ==="); + const auto &time_all0 = std::chrono::steady_clock::now(); + + std::vector> raw_lane_list; + + /* Call image processor library */ + ImageProcessor::Result result; + ImageProcessor::Process(image, result, raw_lane_list); + const auto &time_all1 = std::chrono::steady_clock::now(); + double time_all = (time_all1 - time_all0).count() / 1000000.0; + RCLCPP_INFO(this->get_logger(), "Total: %9.3lf [msec]", time_all); + RCLCPP_INFO(this->get_logger(), " Pre processing: %9.3lf [msec]", result.time_pre_process); + RCLCPP_INFO(this->get_logger(), " Inference: %9.3lf [msec]", result.time_inference); + RCLCPP_INFO(this->get_logger(), " Post processing: %9.3lf [msec]", result.time_post_process); + RCLCPP_INFO(this->get_logger(), "=== Finished frame ==="); + + // Convert the processed cv::Mat back to sensor_msgs::msg::Image and publish + sensor_msgs::msg::Image::SharedPtr img_msg = + cv_bridge::CvImage(msg->header, "bgr8", image).toImageMsg(); + + if (debug_node_) { + image_pub_->publish(*img_msg); + } + + // Create the lane detection message + lane_detection_msgs::msg::LaneDetection lane_msg; + populate_lane_msg(lane_msg, raw_lane_list); + + if (publish_source_image_) { + lane_msg.source_img = *img_msg; + } + + // Save the output image + if (save_images_) { + save_image(image, save_dir_ + "/lane_detection_" + std::to_string(count_) + ".png"); + } + + lane_detection_pub_->publish(lane_msg); + count_++; +} + +int main(int argc, char *argv[]) { + /* Initialize image processor library */ + ImageProcessor::InputParam input_param = {RESOURCE_DIR, 4}; + if (ImageProcessor::Initialize(input_param) != 0) { + RCLCPP_ERROR(rclcpp::get_logger("rclcpp"), "Initialization Error\n"); + return -1; + } + RCLCPP_INFO(rclcpp::get_logger("rclcpp"), "Initializing node"); + rclcpp::init(argc, argv); + + std::shared_ptr node = std::make_shared(); + rclcpp::spin(node); + rclcpp::shutdown(); + return 0; +} diff --git a/src/perception/lane_detection/src/lane_detection_tensorrt b/src/perception/lane_detection/src/lane_detection_tensorrt new file mode 160000 index 00000000..86be6923 --- /dev/null +++ b/src/perception/lane_detection/src/lane_detection_tensorrt @@ -0,0 +1 @@ +Subproject commit 86be69239c01a17da6a3be86f96a0029cee7f146 diff --git a/src/wato_msgs/perception_msgs/lane_detection_msgs/CMakeLists.txt b/src/wato_msgs/perception_msgs/lane_detection_msgs/CMakeLists.txt new file mode 100644 index 00000000..b2cd1884 --- /dev/null +++ b/src/wato_msgs/perception_msgs/lane_detection_msgs/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.10) +project(lane_detection_msgs) + +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) +endif() + +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall -Wextra -Wpedantic) +endif() + +find_package(ament_cmake REQUIRED) +find_package(std_msgs REQUIRED) +find_package(geometry_msgs REQUIRED) +find_package(sensor_msgs REQUIRED) + +set(msg_files + msg/LaneLine.msg + msg/LaneDetection.msg) + +rosidl_generate_interfaces(lane_detection_msgs + ${msg_files} + DEPENDENCIES std_msgs geometry_msgs sensor_msgs) + +ament_export_dependencies(rosidl_default_runtime) +ament_package() \ No newline at end of file diff --git a/src/wato_msgs/perception_msgs/lane_detection_msgs/msg/LaneDetection.msg b/src/wato_msgs/perception_msgs/lane_detection_msgs/msg/LaneDetection.msg new file mode 100644 index 00000000..abc06496 --- /dev/null +++ b/src/wato_msgs/perception_msgs/lane_detection_msgs/msg/LaneDetection.msg @@ -0,0 +1,5 @@ +std_msgs/Header header +LaneLine[] lines + +# Source image (optional) +sensor_msgs/Image source_img \ No newline at end of file diff --git a/src/wato_msgs/perception_msgs/lane_detection_msgs/msg/LaneLine.msg b/src/wato_msgs/perception_msgs/lane_detection_msgs/msg/LaneLine.msg new file mode 100644 index 00000000..7b8976ce --- /dev/null +++ b/src/wato_msgs/perception_msgs/lane_detection_msgs/msg/LaneLine.msg @@ -0,0 +1 @@ +geometry_msgs/Point[] points \ No newline at end of file diff --git a/src/wato_msgs/perception_msgs/lane_detection_msgs/package.xml b/src/wato_msgs/perception_msgs/lane_detection_msgs/package.xml new file mode 100644 index 00000000..400c9b6d --- /dev/null +++ b/src/wato_msgs/perception_msgs/lane_detection_msgs/package.xml @@ -0,0 +1,22 @@ + + + lane_detection_msgs + 0.0.0 + Lane Detection ROS2 messages + + Perception + TODO + + ament_cmake + std_msgs + geometry_msgs + sensor_msgs + + rosidl_default_generators + rosidl_default_runtime + rosidl_interface_packages + + + ament_cmake + + \ No newline at end of file diff --git a/src/wato_msgs/radar_msgs/CMakeLists.txt b/src/wato_msgs/perception_msgs/radar_msgs/CMakeLists.txt similarity index 100% rename from src/wato_msgs/radar_msgs/CMakeLists.txt rename to src/wato_msgs/perception_msgs/radar_msgs/CMakeLists.txt diff --git a/src/wato_msgs/radar_msgs/msg/RadarDetection.msg b/src/wato_msgs/perception_msgs/radar_msgs/msg/RadarDetection.msg similarity index 100% rename from src/wato_msgs/radar_msgs/msg/RadarDetection.msg rename to src/wato_msgs/perception_msgs/radar_msgs/msg/RadarDetection.msg diff --git a/src/wato_msgs/radar_msgs/msg/RadarPacket.msg b/src/wato_msgs/perception_msgs/radar_msgs/msg/RadarPacket.msg similarity index 100% rename from src/wato_msgs/radar_msgs/msg/RadarPacket.msg rename to src/wato_msgs/perception_msgs/radar_msgs/msg/RadarPacket.msg diff --git a/src/wato_msgs/radar_msgs/package.xml b/src/wato_msgs/perception_msgs/radar_msgs/package.xml similarity index 100% rename from src/wato_msgs/radar_msgs/package.xml rename to src/wato_msgs/perception_msgs/radar_msgs/package.xml