From 7ff603aaad76702d89b2d2bf7196ece2ecf19139 Mon Sep 17 00:00:00 2001 From: Alexander Entinger Date: Mon, 13 Nov 2023 13:54:33 +0100 Subject: [PATCH] Rename from "t07_ros" to "t07_robot. --- .github/workflows/ros2.yml | 2 +- CMakeLists.txt | 15 +++++++-------- README.md | 14 +++++++------- include/{t07_ros => t07_robot}/CanManager.h | 2 +- include/{t07_ros => t07_robot}/Node.h | 2 +- launch/{t07.py => robot.py} | 6 +++--- package.xml | 2 +- src/CanManager.cpp | 4 ++-- src/Node.cpp | 6 +++--- src/main.cpp | 4 ++-- 10 files changed, 28 insertions(+), 29 deletions(-) rename include/{t07_ros => t07_robot}/CanManager.h (94%) rename include/{t07_ros => t07_robot}/Node.h (97%) rename launch/{t07.py => robot.py} (89%) diff --git a/.github/workflows/ros2.yml b/.github/workflows/ros2.yml index 56229bc..559f004 100644 --- a/.github/workflows/ros2.yml +++ b/.github/workflows/ros2.yml @@ -73,7 +73,7 @@ jobs: - uses: actions/checkout@v4 with: - path: 'ros2_ws/src/t07_ros' + path: 'ros2_ws/src/t07_robot' submodules: true fetch-depth: 1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d7da5d..adae7a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,14 +1,13 @@ ####################################################################################### cmake_minimum_required(VERSION 3.8) ####################################################################################### -project(t07_ros) -set(T07_ROS_TARGET ${PROJECT_NAME}_node) +project(t07_robot) +set(T07_ROBOT_TARGET ${PROJECT_NAME}_node) ####################################################################################### if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") - add_compile_options(-Wall -Wextra -Wpedantic) + add_compile_options(-Wall -Wextra -Werror -Wpedantic) endif() ####################################################################################### -# find dependencies find_package(ament_cmake REQUIRED) find_package(rclcpp REQUIRED) find_package(std_msgs REQUIRED) @@ -21,18 +20,18 @@ include_directories( include ) ####################################################################################### -add_executable(${T07_ROS_TARGET} +add_executable(${T07_ROBOT_TARGET} src/CanManager.cpp src/Node.cpp src/main.cpp ) ####################################################################################### -target_link_libraries(${T07_ROS_TARGET} +target_link_libraries(${T07_ROBOT_TARGET} cyphal++ socketcan ) ####################################################################################### -target_compile_features(${T07_ROS_TARGET} PRIVATE cxx_std_20) -ament_target_dependencies(${T07_ROS_TARGET} rclcpp std_msgs mp-units) +target_compile_features(${T07_ROBOT_TARGET} PRIVATE cxx_std_20) +ament_target_dependencies(${T07_ROBOT_TARGET} rclcpp std_msgs mp-units) ####################################################################################### if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) diff --git a/README.md b/README.md index 0a76f25..b983575 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -:floppy_disk: `t07_ros` -======================= -[![Build Status](https://github.com/107-systems/t07_ros/actions/workflows/ros2.yml/badge.svg)](https://github.com/107-systems/t07_ros/actions/workflows/ros2.yml) -[![Spell Check status](https://github.com/107-systems/t07_ros/actions/workflows/spell-check.yml/badge.svg)](https://github.com/107-systems/t07_ros/actions/workflows/spell-check.yml) +:floppy_disk: `t07_robot` +========================= +[![Build Status](https://github.com/107-systems/t07_robot/actions/workflows/ros2.yml/badge.svg)](https://github.com/107-systems/t07_robot/actions/workflows/ros2.yml) +[![Spell Check status](https://github.com/107-systems/t07_robot/actions/workflows/spell-check.yml/badge.svg)](https://github.com/107-systems/t07_robot/actions/workflows/spell-check.yml) ROS control code for the [T07](https://github.com/107-systems/T07) robot. @@ -40,17 +40,17 @@ sudo make install * Build with `colcon` ```bash cd $COLCON_WS/src -git clone https://github.com/107-systems/t07_ros +git clone --recursive https://github.com/107-systems/t07_robot cd $COLCON_WS source /opt/ros/humble/setup.bash -colcon build --packages-select t07_ros +colcon build --packages-select t07_robot ``` #### How-to-run ```bash cd $COLCON_WS . install/setup.bash -ros2 launch t07_ros t07.py +ros2 launch t07_robot robot.py ``` #### Interface Documentation diff --git a/include/t07_ros/CanManager.h b/include/t07_robot/CanManager.h similarity index 94% rename from include/t07_ros/CanManager.h rename to include/t07_robot/CanManager.h index 4febe8c..38e88d8 100644 --- a/include/t07_ros/CanManager.h +++ b/include/t07_robot/CanManager.h @@ -1,7 +1,7 @@ /** * Copyright (c) 2022 LXRobotics GmbH. * Author: Alexander Entinger - * Contributors: https://github.com/107-systems/ros2_cyphal_bridge/graphs/contributors. + * Contributors: https://github.com/107-systems/t07_robot/graphs/contributors. */ #pragma once diff --git a/include/t07_ros/Node.h b/include/t07_robot/Node.h similarity index 97% rename from include/t07_ros/Node.h rename to include/t07_robot/Node.h index 52978ac..f013c2e 100644 --- a/include/t07_ros/Node.h +++ b/include/t07_robot/Node.h @@ -1,7 +1,7 @@ /** * Copyright (c) 2023 LXRobotics GmbH. * Author: Alexander Entinger - * Contributors: https://github.com/107-systems/t07_ros/graphs/contributors. + * Contributors: https://github.com/107-systems/t07_robot/graphs/contributors. */ #pragma once diff --git a/launch/t07.py b/launch/robot.py similarity index 89% rename from launch/t07.py rename to launch/robot.py index 3824de5..aa80f38 100644 --- a/launch/t07.py +++ b/launch/robot.py @@ -4,9 +4,9 @@ def generate_launch_description(): return LaunchDescription([ Node( - package='t07_ros', - executable='t07_ros_node', - name='t07_ros', + package='t07_robot', + executable='t07_robot_node', + name='t07_robot', namespace='t07', output='screen', emulate_tty=True, diff --git a/package.xml b/package.xml index 15e1c86..189c2fe 100644 --- a/package.xml +++ b/package.xml @@ -1,7 +1,7 @@ - t07_ros + t07_robot 1.0.0 ROS control code for the T07 robot. alex diff --git a/src/CanManager.cpp b/src/CanManager.cpp index 23863e9..8d01692 100644 --- a/src/CanManager.cpp +++ b/src/CanManager.cpp @@ -1,14 +1,14 @@ /** * Copyright (c) 2022 LXRobotics GmbH. * Author: Alexander Entinger - * Contributors: https://github.com/107-systems/ros2_cyphal_bridge/graphs/contributors. + * Contributors: https://github.com/107-systems/t07_robot/graphs/contributors. */ /************************************************************************************** * INCLUDES **************************************************************************************/ -#include +#include #include diff --git a/src/Node.cpp b/src/Node.cpp index 56ffd54..78984fd 100644 --- a/src/Node.cpp +++ b/src/Node.cpp @@ -1,14 +1,14 @@ /** * Copyright (c) 2023 LXRobotics GmbH. * Author: Alexander Entinger - * Contributors: https://github.com/107-systems/t07_ros/graphs/contributors. + * Contributors: https://github.com/107-systems/t07_robot/graphs/contributors. */ /************************************************************************************** * INCLUDE **************************************************************************************/ -#include +#include /************************************************************************************** * NAMESPACE @@ -22,7 +22,7 @@ namespace t07 **************************************************************************************/ Node::Node() -: rclcpp::Node("t07_ros_node") +: rclcpp::Node("t07_robot_node") , _node_heap{} , _node_hdl{_node_heap.data(), _node_heap.size(), diff --git a/src/main.cpp b/src/main.cpp index 11324d6..e11b940 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,7 +1,7 @@ /** * Copyright (c) 2023 LXRobotics GmbH. * Author: Alexander Entinger - * Contributors: https://github.com/107-systems/t07_ros/graphs/contributors. + * Contributors: https://github.com/107-systems/t07_robot/graphs/contributors. */ /************************************************************************************** @@ -10,7 +10,7 @@ #include -#include +#include /************************************************************************************** * MAIN