diff --git a/spot_driver_cpp/CMakeLists.txt b/spot_driver/CMakeLists.txt similarity index 86% rename from spot_driver_cpp/CMakeLists.txt rename to spot_driver/CMakeLists.txt index 267e84344..ac15fd42f 100644 --- a/spot_driver_cpp/CMakeLists.txt +++ b/spot_driver/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.22) list(APPEND CMAKE_PREFIX_PATH /opt/spot-cpp-sdk) -project(spot_driver_cpp) +project(spot_driver) if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic) @@ -22,6 +22,7 @@ set(THIS_PACKAGE_INCLUDE_ROS_DEPENDS ) find_package(ament_cmake REQUIRED) +find_package(ament_cmake_python REQUIRED) find_package(bosdyn REQUIRED) foreach(Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_ROS_DEPENDS}) find_package(${Dependency} REQUIRED) @@ -100,6 +101,25 @@ rclcpp_components_register_node( PLUGIN "spot_ros2::kinematic::KinematicNode" EXECUTABLE kinematic_node_component) +ament_python_install_package(${PROJECT_NAME}) +install( + PROGRAMS + spot_driver/command_spot_driver.py + DESTINATION lib/${PROJECT_NAME} + RENAME command_spot + ) +install( + PROGRAMS + spot_driver/publish_cameras.py + DESTINATION lib/${PROJECT_NAME} + RENAME spot_publish_cameras + ) +install( + PROGRAMS + spot_driver/spot_ros2.py + DESTINATION lib/${PROJECT_NAME} + RENAME spot_ros2 + ) # Install Libraries install( TARGETS @@ -128,6 +148,11 @@ install( # Install include directory install(DIRECTORY include/ DESTINATION include) +# Install launch and configurations +install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY rviz DESTINATION share/${PROJECT_NAME}) + ament_export_targets(${PROJECT_NAME}Targets HAS_LIBRARY_TARGET) ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS}) diff --git a/spot_driver/LICENSE b/spot_driver/LICENSE index 9ed483f73..b3dea6a86 100644 --- a/spot_driver/LICENSE +++ b/spot_driver/LICENSE @@ -1,3 +1,26 @@ +MIT License + +Copyright (c) 2023 Boston Dynamics AI Institute + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + BSD 3-Clause License Copyright (c) 2021, Clearpath Robotics Inc. diff --git a/spot_driver/README.md b/spot_driver/README.md new file mode 100644 index 000000000..fc12c463e --- /dev/null +++ b/spot_driver/README.md @@ -0,0 +1,20 @@ +# spot_driver + +This package provides ROS 2 nodes to interact with Spot through its SDK. + +## Why Python? +Being known for it's ease of use and flexibility, the Spot Python SDK is used for many operations. +There are several entry points, though it is recommended to use the provided launch files. + +- `spot_ros2` is the node used to connect to the spot and creates ROS 2 action servers and services. +- `command_spot` provides a command line interface with ROS 2 clients to send simple commands. +- `spot_publish_cameras` publishes camera images from spot cameras to ROS topics. +> :warning: **Warning:** For performance reasons, `spot_publish_cameras` is being rewritten in C++. + +## Why C++? + +The Spot C++ SDK is more performant than the Spot Python SDK for some operations. + +For example, the Spot C++ SDK's image client can retrieve images from all Spot's RGB and depth cameras at close to their native refresh rate of 15Hz. + +In constrast, the Spot Python SDK's image client slows substantially when requesting images from multiple depth cameras at once, and it can only maintain around 1Hz when requesting images from all RGB and depth cameras at once. diff --git a/spot_driver_cpp/include/spot_driver_cpp/api/default_image_client.hpp b/spot_driver/include/spot_driver/api/default_image_client.hpp similarity index 83% rename from spot_driver_cpp/include/spot_driver_cpp/api/default_image_client.hpp rename to spot_driver/include/spot_driver/api/default_image_client.hpp index 169334fee..fcec1ed65 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/api/default_image_client.hpp +++ b/spot_driver/include/spot_driver/api/default_image_client.hpp @@ -4,9 +4,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/api/default_kinematic_api.hpp b/spot_driver/include/spot_driver/api/default_kinematic_api.hpp similarity index 92% rename from spot_driver_cpp/include/spot_driver_cpp/api/default_kinematic_api.hpp rename to spot_driver/include/spot_driver/api/default_kinematic_api.hpp index 925323cbe..019ab3f3d 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/api/default_kinematic_api.hpp +++ b/spot_driver/include/spot_driver/api/default_kinematic_api.hpp @@ -2,7 +2,7 @@ #pragma once -#include +#include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/api/default_spot_api.hpp b/spot_driver/include/spot_driver/api/default_spot_api.hpp similarity index 92% rename from spot_driver_cpp/include/spot_driver_cpp/api/default_spot_api.hpp rename to spot_driver/include/spot_driver/api/default_spot_api.hpp index 70067588c..8bbe9bfba 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/api/default_spot_api.hpp +++ b/spot_driver/include/spot_driver/api/default_spot_api.hpp @@ -2,11 +2,11 @@ #pragma once -#include +#include #include #include -#include +#include #include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/api/default_time_sync_api.hpp b/spot_driver/include/spot_driver/api/default_time_sync_api.hpp similarity index 97% rename from spot_driver_cpp/include/spot_driver_cpp/api/default_time_sync_api.hpp rename to spot_driver/include/spot_driver/api/default_time_sync_api.hpp index 5842ea80e..4f4b34fa7 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/api/default_time_sync_api.hpp +++ b/spot_driver/include/spot_driver/api/default_time_sync_api.hpp @@ -6,7 +6,7 @@ #include #include #include -#include +#include #include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/api/kinematic_api.hpp b/spot_driver/include/spot_driver/api/kinematic_api.hpp similarity index 100% rename from spot_driver_cpp/include/spot_driver_cpp/api/kinematic_api.hpp rename to spot_driver/include/spot_driver/api/kinematic_api.hpp diff --git a/spot_driver_cpp/include/spot_driver_cpp/api/spot_api.hpp b/spot_driver/include/spot_driver/api/spot_api.hpp similarity index 86% rename from spot_driver_cpp/include/spot_driver_cpp/api/spot_api.hpp rename to spot_driver/include/spot_driver/api/spot_api.hpp index ba6ae1780..71f6c3d54 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/api/spot_api.hpp +++ b/spot_driver/include/spot_driver/api/spot_api.hpp @@ -2,8 +2,8 @@ #pragma once -#include -#include +#include +#include #include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/api/spot_image_sources.hpp b/spot_driver/include/spot_driver/api/spot_image_sources.hpp similarity index 98% rename from spot_driver_cpp/include/spot_driver_cpp/api/spot_image_sources.hpp rename to spot_driver/include/spot_driver/api/spot_image_sources.hpp index 95e886986..32966b477 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/api/spot_image_sources.hpp +++ b/spot_driver/include/spot_driver/api/spot_image_sources.hpp @@ -3,7 +3,7 @@ #pragma once #include -#include +#include #include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/api/time_sync_api.hpp b/spot_driver/include/spot_driver/api/time_sync_api.hpp similarity index 100% rename from spot_driver_cpp/include/spot_driver_cpp/api/time_sync_api.hpp rename to spot_driver/include/spot_driver/api/time_sync_api.hpp diff --git a/spot_driver_cpp/include/spot_driver_cpp/conversions/common_conversions.hpp b/spot_driver/include/spot_driver/conversions/common_conversions.hpp similarity index 100% rename from spot_driver_cpp/include/spot_driver_cpp/conversions/common_conversions.hpp rename to spot_driver/include/spot_driver/conversions/common_conversions.hpp diff --git a/spot_driver_cpp/include/spot_driver_cpp/conversions/kinematic_conversions.hpp b/spot_driver/include/spot_driver/conversions/kinematic_conversions.hpp similarity index 100% rename from spot_driver_cpp/include/spot_driver_cpp/conversions/kinematic_conversions.hpp rename to spot_driver/include/spot_driver/conversions/kinematic_conversions.hpp diff --git a/spot_driver_cpp/include/spot_driver_cpp/images/images_middleware_handle.hpp b/spot_driver/include/spot_driver/images/images_middleware_handle.hpp similarity index 90% rename from spot_driver_cpp/include/spot_driver_cpp/images/images_middleware_handle.hpp rename to spot_driver/include/spot_driver/images/images_middleware_handle.hpp index 25b1040e0..50115faaa 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/images/images_middleware_handle.hpp +++ b/spot_driver/include/spot_driver/images/images_middleware_handle.hpp @@ -6,11 +6,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/images/spot_image_publisher.hpp b/spot_driver/include/spot_driver/images/spot_image_publisher.hpp similarity index 91% rename from spot_driver_cpp/include/spot_driver_cpp/images/spot_image_publisher.hpp rename to spot_driver/include/spot_driver/images/spot_image_publisher.hpp index a01700abb..51ddd91f6 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/images/spot_image_publisher.hpp +++ b/spot_driver/include/spot_driver/images/spot_image_publisher.hpp @@ -8,13 +8,13 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/images/spot_image_publisher_node.hpp b/spot_driver/include/spot_driver/images/spot_image_publisher_node.hpp similarity index 84% rename from spot_driver_cpp/include/spot_driver_cpp/images/spot_image_publisher_node.hpp rename to spot_driver/include/spot_driver/images/spot_image_publisher_node.hpp index 349f6f83c..aa49d3d1f 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/images/spot_image_publisher_node.hpp +++ b/spot_driver/include/spot_driver/images/spot_image_publisher_node.hpp @@ -4,10 +4,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/interfaces/image_client_interface.hpp b/spot_driver/include/spot_driver/interfaces/image_client_interface.hpp similarity index 93% rename from spot_driver_cpp/include/spot_driver_cpp/interfaces/image_client_interface.hpp rename to spot_driver/include/spot_driver/interfaces/image_client_interface.hpp index 324d697db..c6cffbd5e 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/interfaces/image_client_interface.hpp +++ b/spot_driver/include/spot_driver/interfaces/image_client_interface.hpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/interfaces/logger_interface_base.hpp b/spot_driver/include/spot_driver/interfaces/logger_interface_base.hpp similarity index 100% rename from spot_driver_cpp/include/spot_driver_cpp/interfaces/logger_interface_base.hpp rename to spot_driver/include/spot_driver/interfaces/logger_interface_base.hpp diff --git a/spot_driver_cpp/include/spot_driver_cpp/interfaces/parameter_interface_base.hpp b/spot_driver/include/spot_driver/interfaces/parameter_interface_base.hpp similarity index 100% rename from spot_driver_cpp/include/spot_driver_cpp/interfaces/parameter_interface_base.hpp rename to spot_driver/include/spot_driver/interfaces/parameter_interface_base.hpp diff --git a/spot_driver_cpp/include/spot_driver_cpp/interfaces/rclcpp_logger_interface.hpp b/spot_driver/include/spot_driver/interfaces/rclcpp_logger_interface.hpp similarity index 94% rename from spot_driver_cpp/include/spot_driver_cpp/interfaces/rclcpp_logger_interface.hpp rename to spot_driver/include/spot_driver/interfaces/rclcpp_logger_interface.hpp index fe4aa4603..2d5b0719f 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/interfaces/rclcpp_logger_interface.hpp +++ b/spot_driver/include/spot_driver/interfaces/rclcpp_logger_interface.hpp @@ -3,7 +3,7 @@ #pragma once #include -#include +#include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/interfaces/rclcpp_parameter_interface.hpp b/spot_driver/include/spot_driver/interfaces/rclcpp_parameter_interface.hpp similarity index 94% rename from spot_driver_cpp/include/spot_driver_cpp/interfaces/rclcpp_parameter_interface.hpp rename to spot_driver/include/spot_driver/interfaces/rclcpp_parameter_interface.hpp index 8e3c0077d..dbcd930ba 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/interfaces/rclcpp_parameter_interface.hpp +++ b/spot_driver/include/spot_driver/interfaces/rclcpp_parameter_interface.hpp @@ -3,7 +3,7 @@ #pragma once #include -#include +#include #include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/interfaces/rclcpp_tf_interface.hpp b/spot_driver/include/spot_driver/interfaces/rclcpp_tf_interface.hpp similarity index 97% rename from spot_driver_cpp/include/spot_driver_cpp/interfaces/rclcpp_tf_interface.hpp rename to spot_driver/include/spot_driver/interfaces/rclcpp_tf_interface.hpp index bcc771904..059a3bea5 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/interfaces/rclcpp_tf_interface.hpp +++ b/spot_driver/include/spot_driver/interfaces/rclcpp_tf_interface.hpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/interfaces/rclcpp_wall_timer_interface.hpp b/spot_driver/include/spot_driver/interfaces/rclcpp_wall_timer_interface.hpp similarity index 93% rename from spot_driver_cpp/include/spot_driver_cpp/interfaces/rclcpp_wall_timer_interface.hpp rename to spot_driver/include/spot_driver/interfaces/rclcpp_wall_timer_interface.hpp index ea56a74f6..c7a7cc091 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/interfaces/rclcpp_wall_timer_interface.hpp +++ b/spot_driver/include/spot_driver/interfaces/rclcpp_wall_timer_interface.hpp @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/interfaces/tf_interface_base.hpp b/spot_driver/include/spot_driver/interfaces/tf_interface_base.hpp similarity index 100% rename from spot_driver_cpp/include/spot_driver_cpp/interfaces/tf_interface_base.hpp rename to spot_driver/include/spot_driver/interfaces/tf_interface_base.hpp diff --git a/spot_driver_cpp/include/spot_driver_cpp/interfaces/timer_interface_base.hpp b/spot_driver/include/spot_driver/interfaces/timer_interface_base.hpp similarity index 100% rename from spot_driver_cpp/include/spot_driver_cpp/interfaces/timer_interface_base.hpp rename to spot_driver/include/spot_driver/interfaces/timer_interface_base.hpp diff --git a/spot_driver_cpp/include/spot_driver_cpp/kinematic/kinematic_middleware_handle.hpp b/spot_driver/include/spot_driver/kinematic/kinematic_middleware_handle.hpp similarity index 93% rename from spot_driver_cpp/include/spot_driver_cpp/kinematic/kinematic_middleware_handle.hpp rename to spot_driver/include/spot_driver/kinematic/kinematic_middleware_handle.hpp index f5a391a1d..1801f60b1 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/kinematic/kinematic_middleware_handle.hpp +++ b/spot_driver/include/spot_driver/kinematic/kinematic_middleware_handle.hpp @@ -1,6 +1,6 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. -#include +#include #include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/kinematic/kinematic_node.hpp b/spot_driver/include/spot_driver/kinematic/kinematic_node.hpp similarity index 86% rename from spot_driver_cpp/include/spot_driver_cpp/kinematic/kinematic_node.hpp rename to spot_driver/include/spot_driver/kinematic/kinematic_node.hpp index b69fe0a09..9eadffc89 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/kinematic/kinematic_node.hpp +++ b/spot_driver/include/spot_driver/kinematic/kinematic_node.hpp @@ -2,11 +2,11 @@ #pragma once -#include +#include -#include -#include -#include +#include +#include +#include #include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/kinematic/kinematic_service.hpp b/spot_driver/include/spot_driver/kinematic/kinematic_service.hpp similarity index 94% rename from spot_driver_cpp/include/spot_driver_cpp/kinematic/kinematic_service.hpp rename to spot_driver/include/spot_driver/kinematic/kinematic_service.hpp index ab8aed0c9..14b825bb6 100644 --- a/spot_driver_cpp/include/spot_driver_cpp/kinematic/kinematic_service.hpp +++ b/spot_driver/include/spot_driver/kinematic/kinematic_service.hpp @@ -2,9 +2,9 @@ #pragma once -#include +#include -#include +#include #include diff --git a/spot_driver_cpp/include/spot_driver_cpp/types.hpp b/spot_driver/include/spot_driver/types.hpp similarity index 100% rename from spot_driver_cpp/include/spot_driver_cpp/types.hpp rename to spot_driver/include/spot_driver/types.hpp diff --git a/spot_driver/launch/spot_driver.launch.py b/spot_driver/launch/spot_driver.launch.py index f9b15da84..3650515b9 100644 --- a/spot_driver/launch/spot_driver.launch.py +++ b/spot_driver/launch/spot_driver.launch.py @@ -198,7 +198,7 @@ def launch_setup(context: LaunchContext, ld: LaunchDescription) -> None: spot_image_publisher_params.update({"publish_depth_registered": False}) spot_image_publisher_node = launch_ros.actions.Node( - package="spot_driver_cpp", + package="spot_driver", executable="spot_image_publisher_node", output="screen", parameters=[config_file, spot_image_publisher_params], @@ -211,7 +211,7 @@ def launch_setup(context: LaunchContext, ld: LaunchDescription) -> None: kinematc_node_params = {"spot_name": spot_name} kinematic_node = launch_ros.actions.Node( - package="spot_driver_cpp", + package="spot_driver", executable="kinematic_node", output="screen", parameters=[config_file, kinematc_node_params], diff --git a/spot_driver/package.xml b/spot_driver/package.xml index c44ca57c2..98792da63 100644 --- a/spot_driver/package.xml +++ b/spot_driver/package.xml @@ -3,37 +3,42 @@ spot_driver 0.0.0 - This is a ROS2 package for Boston Dynamics' Spot. - max + ROS 2 driver nodes for Spot. + BD AI Institute MIT ament_cmake + ament_cmake_python rosidl_default_generators - bdai_ros2_wrappers - common_interfaces - depth_image_proc - nav_msgs - protobuf - python3-protobuf - rclcpp_components - robot_state_publisher - rosidl_default_runtime - rviz2 - sensor_msgs - spot_description - spot_driver_cpp - spot_msgs - spot_wrapper - xacro + bdai_ros2_wrappers + bosdyn + common_interfaces + depth_image_proc + geometry_msgs + nav_msgs + protobuf + python3-protobuf + rclcpp + rclcpp_components + rclpy + robot_state_publisher + rosidl_default_runtime + rviz2 + sensor_msgs + spot_description + spot_msgs + spot_wrapper + tf2_ros + tl_expected + xacro - ament_copyright - ament_pep257 - ament_cmake_pytest - rosidl_interface_packages + + ament_cmake_gmock + ament_cmake_pytest - ament_python + ament_cmake diff --git a/spot_driver/resource/spot_driver b/spot_driver/resource/spot_driver deleted file mode 100644 index e69de29bb..000000000 diff --git a/spot_driver/setup.cfg b/spot_driver/setup.cfg deleted file mode 100644 index 21a554540..000000000 --- a/spot_driver/setup.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[develop] -script_dir=$base/lib/spot_driver -[install] -install_scripts=$base/lib/spot_driver diff --git a/spot_driver/setup.py b/spot_driver/setup.py deleted file mode 100644 index 2f35fe286..000000000 --- a/spot_driver/setup.py +++ /dev/null @@ -1,33 +0,0 @@ -import os -from glob import glob - -from setuptools import setup - -package_name = "spot_driver" - -setup( - name=package_name, - version="0.0.0", - packages=[package_name], - data_files=[ - ("share/ament_index/resource_index/packages", ["resource/" + package_name]), - ("share/" + package_name, ["package.xml"]), - (os.path.join("share", package_name, "launch"), glob("launch/*.launch.py")), - (os.path.join("share", package_name, "rviz"), glob("rviz/*")), - (os.path.join("share", package_name, "config"), glob("config/*.yaml")), - ], - install_requires=["setuptools"], - zip_safe=True, - maintainer="max", - maintainer_email="maximillian.kirsch@alumni.fh-aachen.de", - description="TODO: Package description", - license="TODO: License declaration", - tests_require=["pytest"], - entry_points={ - "console_scripts": [ - "spot_ros2 = spot_driver.spot_ros2:main", - "command_spot = spot_driver.command_spot_driver:main", - "spot_publish_cameras = spot_driver.publish_cameras:main", - ], - }, -) diff --git a/spot_driver/spot_driver/command_spot_driver.py b/spot_driver/spot_driver/command_spot_driver.py index 7aec05b92..f28e0dae3 100644 --- a/spot_driver/spot_driver/command_spot_driver.py +++ b/spot_driver/spot_driver/command_spot_driver.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 import math import time from typing import Any, Optional diff --git a/spot_driver/spot_driver/publish_cameras.py b/spot_driver/spot_driver/publish_cameras.py index f33481972..7f2810fc6 100644 --- a/spot_driver/spot_driver/publish_cameras.py +++ b/spot_driver/spot_driver/publish_cameras.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # Copyright [2023] Boston Dynamics AI Institute, Inc. import time diff --git a/spot_driver/spot_driver/spot_ros2.py b/spot_driver/spot_driver/spot_ros2.py index 5fca21ef2..aa2701344 100644 --- a/spot_driver/spot_driver/spot_ros2.py +++ b/spot_driver/spot_driver/spot_ros2.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # Debug # from ros_helpers import * import logging diff --git a/spot_driver_cpp/src/api/default_image_client.cpp b/spot_driver/src/api/default_image_client.cpp similarity index 98% rename from spot_driver_cpp/src/api/default_image_client.cpp rename to spot_driver/src/api/default_image_client.cpp index 52a403115..d1f55c7bc 100644 --- a/spot_driver_cpp/src/api/default_image_client.cpp +++ b/spot_driver/src/api/default_image_client.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. -#include +#include #include #include @@ -14,9 +14,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/spot_driver_cpp/src/api/default_kinematic_api.cpp b/spot_driver/src/api/default_kinematic_api.cpp similarity index 94% rename from spot_driver_cpp/src/api/default_kinematic_api.cpp rename to spot_driver/src/api/default_kinematic_api.cpp index 314c961d1..e9d77879c 100644 --- a/spot_driver_cpp/src/api/default_kinematic_api.cpp +++ b/spot_driver/src/api/default_kinematic_api.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. -#include +#include namespace spot_ros2 { DefaultKinematicApi::DefaultKinematicApi(bosdyn::client::InverseKinematicsClient* kinematic_client) diff --git a/spot_driver_cpp/src/api/default_spot_api.cpp b/spot_driver/src/api/default_spot_api.cpp similarity index 94% rename from spot_driver_cpp/src/api/default_spot_api.cpp rename to spot_driver/src/api/default_spot_api.cpp index 6d705f63a..50ec09faf 100644 --- a/spot_driver_cpp/src/api/default_spot_api.cpp +++ b/spot_driver/src/api/default_spot_api.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. #include -#include -#include -#include -#include +#include +#include +#include +#include namespace spot_ros2 { diff --git a/spot_driver_cpp/src/api/default_time_sync_api.cpp b/spot_driver/src/api/default_time_sync_api.cpp similarity index 95% rename from spot_driver_cpp/src/api/default_time_sync_api.cpp rename to spot_driver/src/api/default_time_sync_api.cpp index 6a5b87078..1972f0746 100644 --- a/spot_driver_cpp/src/api/default_time_sync_api.cpp +++ b/spot_driver/src/api/default_time_sync_api.cpp @@ -1,5 +1,5 @@ -#include +#include namespace spot_ros2 { diff --git a/spot_driver_cpp/src/api/spot_image_sources.cpp b/spot_driver/src/api/spot_image_sources.cpp similarity index 98% rename from spot_driver_cpp/src/api/spot_image_sources.cpp rename to spot_driver/src/api/spot_image_sources.cpp index f7e8b334a..a8a6e4f0e 100644 --- a/spot_driver_cpp/src/api/spot_image_sources.cpp +++ b/spot_driver/src/api/spot_image_sources.cpp @@ -1,8 +1,8 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. #include -#include -#include +#include +#include #include #include #include diff --git a/spot_driver_cpp/src/conversions/common_conversions.cpp b/spot_driver/src/conversions/common_conversions.cpp similarity index 98% rename from spot_driver_cpp/src/conversions/common_conversions.cpp rename to spot_driver/src/conversions/common_conversions.cpp index 8f6f49efd..110072105 100644 --- a/spot_driver_cpp/src/conversions/common_conversions.cpp +++ b/spot_driver/src/conversions/common_conversions.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. -#include +#include namespace spot_ros2::common_conversions { diff --git a/spot_driver_cpp/src/conversions/kinematic_conversions.cpp b/spot_driver/src/conversions/kinematic_conversions.cpp similarity index 98% rename from spot_driver_cpp/src/conversions/kinematic_conversions.cpp rename to spot_driver/src/conversions/kinematic_conversions.cpp index e2a4c8a4f..624355a8f 100644 --- a/spot_driver_cpp/src/conversions/kinematic_conversions.cpp +++ b/spot_driver/src/conversions/kinematic_conversions.cpp @@ -1,8 +1,8 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. -#include +#include -#include +#include namespace spot_ros2::kinematic_conversions { diff --git a/spot_driver_cpp/src/images/images_middleware_handle.cpp b/spot_driver/src/images/images_middleware_handle.cpp similarity index 88% rename from spot_driver_cpp/src/images/images_middleware_handle.cpp rename to spot_driver/src/images/images_middleware_handle.cpp index 3a852dae0..3619409ee 100644 --- a/spot_driver_cpp/src/images/images_middleware_handle.cpp +++ b/spot_driver/src/images/images_middleware_handle.cpp @@ -1,12 +1,12 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include namespace { constexpr auto kPublisherHistoryDepth = 1; diff --git a/spot_driver_cpp/src/images/spot_image_publisher.cpp b/spot_driver/src/images/spot_image_publisher.cpp similarity index 89% rename from spot_driver_cpp/src/images/spot_image_publisher.cpp rename to spot_driver/src/images/spot_image_publisher.cpp index 0a6581e04..01e7e56c6 100644 --- a/spot_driver_cpp/src/images/spot_image_publisher.cpp +++ b/spot_driver/src/images/spot_image_publisher.cpp @@ -1,19 +1,19 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. -#include +#include #include #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include diff --git a/spot_driver_cpp/src/images/spot_image_publisher_component.cpp b/spot_driver/src/images/spot_image_publisher_component.cpp similarity index 79% rename from spot_driver_cpp/src/images/spot_image_publisher_component.cpp rename to spot_driver/src/images/spot_image_publisher_component.cpp index 5ec03caac..335fb1a00 100644 --- a/spot_driver_cpp/src/images/spot_image_publisher_component.cpp +++ b/spot_driver/src/images/spot_image_publisher_component.cpp @@ -2,6 +2,6 @@ #include #include -#include +#include RCLCPP_COMPONENTS_REGISTER_NODE(spot_ros2::images::SpotImagePublisherNode) diff --git a/spot_driver_cpp/src/images/spot_image_publisher_node.cpp b/spot_driver/src/images/spot_image_publisher_node.cpp similarity index 86% rename from spot_driver_cpp/src/images/spot_image_publisher_node.cpp rename to spot_driver/src/images/spot_image_publisher_node.cpp index cdfdfa9f7..1c38bb5eb 100644 --- a/spot_driver_cpp/src/images/spot_image_publisher_node.cpp +++ b/spot_driver/src/images/spot_image_publisher_node.cpp @@ -1,12 +1,12 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. -#include +#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include namespace { constexpr auto kSDKClientName = "spot_image_publisher"; diff --git a/spot_driver_cpp/src/images/spot_image_publisher_node_main.cpp b/spot_driver/src/images/spot_image_publisher_node_main.cpp similarity index 87% rename from spot_driver_cpp/src/images/spot_image_publisher_node_main.cpp rename to spot_driver/src/images/spot_image_publisher_node_main.cpp index c8f0f8aa3..943670818 100644 --- a/spot_driver_cpp/src/images/spot_image_publisher_node_main.cpp +++ b/spot_driver/src/images/spot_image_publisher_node_main.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include diff --git a/spot_driver_cpp/src/interfaces/rclcpp_logger_interface.cpp b/spot_driver/src/interfaces/rclcpp_logger_interface.cpp similarity index 92% rename from spot_driver_cpp/src/interfaces/rclcpp_logger_interface.cpp rename to spot_driver/src/interfaces/rclcpp_logger_interface.cpp index 4d2c17ea0..58b103d66 100644 --- a/spot_driver_cpp/src/interfaces/rclcpp_logger_interface.cpp +++ b/spot_driver/src/interfaces/rclcpp_logger_interface.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. -#include +#include #include diff --git a/spot_driver_cpp/src/interfaces/rclcpp_parameter_interface.cpp b/spot_driver/src/interfaces/rclcpp_parameter_interface.cpp similarity index 98% rename from spot_driver_cpp/src/interfaces/rclcpp_parameter_interface.cpp rename to spot_driver/src/interfaces/rclcpp_parameter_interface.cpp index 342e43606..5f12d227a 100644 --- a/spot_driver_cpp/src/interfaces/rclcpp_parameter_interface.cpp +++ b/spot_driver/src/interfaces/rclcpp_parameter_interface.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. -#include +#include #include diff --git a/spot_driver_cpp/src/interfaces/rclcpp_tf_interface.cpp b/spot_driver/src/interfaces/rclcpp_tf_interface.cpp similarity index 94% rename from spot_driver_cpp/src/interfaces/rclcpp_tf_interface.cpp rename to spot_driver/src/interfaces/rclcpp_tf_interface.cpp index 25cb09706..fee61f71e 100644 --- a/spot_driver_cpp/src/interfaces/rclcpp_tf_interface.cpp +++ b/spot_driver/src/interfaces/rclcpp_tf_interface.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. -#include +#include namespace spot_ros2 { RclcppTfInterface::RclcppTfInterface(const std::shared_ptr& node) : static_tf_broadcaster_{node} {} diff --git a/spot_driver_cpp/src/interfaces/rclcpp_wall_timer_interface.cpp b/spot_driver/src/interfaces/rclcpp_wall_timer_interface.cpp similarity index 88% rename from spot_driver_cpp/src/interfaces/rclcpp_wall_timer_interface.cpp rename to spot_driver/src/interfaces/rclcpp_wall_timer_interface.cpp index 2c2df5ca3..855694f03 100644 --- a/spot_driver_cpp/src/interfaces/rclcpp_wall_timer_interface.cpp +++ b/spot_driver/src/interfaces/rclcpp_wall_timer_interface.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. -#include +#include namespace spot_ros2 { RclcppWallTimerInterface::RclcppWallTimerInterface(const std::shared_ptr& node) : node_{node} {} diff --git a/spot_driver_cpp/src/kinematic/kinematic_component.cpp b/spot_driver/src/kinematic/kinematic_component.cpp similarity index 80% rename from spot_driver_cpp/src/kinematic/kinematic_component.cpp rename to spot_driver/src/kinematic/kinematic_component.cpp index de25c9859..4f7bc7b04 100644 --- a/spot_driver_cpp/src/kinematic/kinematic_component.cpp +++ b/spot_driver/src/kinematic/kinematic_component.cpp @@ -2,6 +2,6 @@ #include #include -#include +#include RCLCPP_COMPONENTS_REGISTER_NODE(spot_ros2::kinematic::KinematicNode) diff --git a/spot_driver_cpp/src/kinematic/kinematic_middleware_handle.cpp b/spot_driver/src/kinematic/kinematic_middleware_handle.cpp similarity index 90% rename from spot_driver_cpp/src/kinematic/kinematic_middleware_handle.cpp rename to spot_driver/src/kinematic/kinematic_middleware_handle.cpp index 34d79e593..118f10731 100644 --- a/spot_driver_cpp/src/kinematic/kinematic_middleware_handle.cpp +++ b/spot_driver/src/kinematic/kinematic_middleware_handle.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. -#include +#include namespace spot_ros2::kinematic { diff --git a/spot_driver_cpp/src/kinematic/kinematic_node.cpp b/spot_driver/src/kinematic/kinematic_node.cpp similarity index 89% rename from spot_driver_cpp/src/kinematic/kinematic_node.cpp rename to spot_driver/src/kinematic/kinematic_node.cpp index 869e25c31..c4063242b 100644 --- a/spot_driver_cpp/src/kinematic/kinematic_node.cpp +++ b/spot_driver/src/kinematic/kinematic_node.cpp @@ -1,11 +1,11 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. -#include -#include +#include +#include -#include -#include -#include +#include +#include +#include #include diff --git a/spot_driver_cpp/src/kinematic/kinematic_node_main.cpp b/spot_driver/src/kinematic/kinematic_node_main.cpp similarity index 88% rename from spot_driver_cpp/src/kinematic/kinematic_node_main.cpp rename to spot_driver/src/kinematic/kinematic_node_main.cpp index 2d7d05428..1d7d2a6c4 100644 --- a/spot_driver_cpp/src/kinematic/kinematic_node_main.cpp +++ b/spot_driver/src/kinematic/kinematic_node_main.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include diff --git a/spot_driver_cpp/src/kinematic/kinematic_service.cpp b/spot_driver/src/kinematic/kinematic_service.cpp similarity index 87% rename from spot_driver_cpp/src/kinematic/kinematic_service.cpp rename to spot_driver/src/kinematic/kinematic_service.cpp index 2e7ef19d1..482cfa3a1 100644 --- a/spot_driver_cpp/src/kinematic/kinematic_service.cpp +++ b/spot_driver/src/kinematic/kinematic_service.cpp @@ -1,10 +1,10 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. -#include +#include -#include -#include -#include +#include +#include +#include namespace { constexpr auto kServiceName = "get_inverse_kinematic_solutions"; diff --git a/spot_driver_cpp/test/CMakeLists.txt b/spot_driver/test/CMakeLists.txt similarity index 80% rename from spot_driver_cpp/test/CMakeLists.txt rename to spot_driver/test/CMakeLists.txt index 7df015c97..354fea29f 100644 --- a/spot_driver_cpp/test/CMakeLists.txt +++ b/spot_driver/test/CMakeLists.txt @@ -1,4 +1,5 @@ find_package(ament_cmake_gmock REQUIRED) +find_package(ament_cmake_pytest REQUIRED) #rclcpp_test @@ -73,3 +74,20 @@ target_include_directories(test_kinematic_service $ ) target_link_libraries(test_kinematic_service spot_api) + +#rclpy_test + +set(_pytest_tests + pytests/test_copyright.py + pytests/test_pep257.py + pytests/test_power_management.py + pytests/test_ros_interfaces.py + ) +foreach(_test_path ${_pytest_tests}) + get_filename_component(_test_name ${_test_path} NAME_WE) + ament_add_pytest_test(${_test_name} ${_test_path} + APPEND_ENV PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR} + TIMEOUT 60 + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + ) +endforeach() diff --git a/spot_driver/test/__init__.py b/spot_driver/test/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_image_client.hpp b/spot_driver/test/include/spot_driver/mock/mock_image_client.hpp similarity index 84% rename from spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_image_client.hpp rename to spot_driver/test/include/spot_driver/mock/mock_image_client.hpp index 0a5f5283d..7793ccec1 100644 --- a/spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_image_client.hpp +++ b/spot_driver/test/include/spot_driver/mock/mock_image_client.hpp @@ -2,7 +2,7 @@ #include -#include +#include #include diff --git a/spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_kinematic_api.hpp b/spot_driver/test/include/spot_driver/mock/mock_kinematic_api.hpp similarity index 78% rename from spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_kinematic_api.hpp rename to spot_driver/test/include/spot_driver/mock/mock_kinematic_api.hpp index c1e2db0c5..db7c15712 100644 --- a/spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_kinematic_api.hpp +++ b/spot_driver/test/include/spot_driver/mock/mock_kinematic_api.hpp @@ -2,8 +2,8 @@ #include -#include -#include +#include +#include #include diff --git a/spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_logger_interface.hpp b/spot_driver/test/include/spot_driver/mock/mock_logger_interface.hpp similarity index 91% rename from spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_logger_interface.hpp rename to spot_driver/test/include/spot_driver/mock/mock_logger_interface.hpp index 9e8b1d9d7..3ba79a14e 100644 --- a/spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_logger_interface.hpp +++ b/spot_driver/test/include/spot_driver/mock/mock_logger_interface.hpp @@ -2,7 +2,7 @@ #include -#include +#include #include diff --git a/spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_spot_api.hpp b/spot_driver/test/include/spot_driver/mock/mock_spot_api.hpp similarity index 82% rename from spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_spot_api.hpp rename to spot_driver/test/include/spot_driver/mock/mock_spot_api.hpp index e32b7f9d7..068298bcd 100644 --- a/spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_spot_api.hpp +++ b/spot_driver/test/include/spot_driver/mock/mock_spot_api.hpp @@ -2,9 +2,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_tf_interface.hpp b/spot_driver/test/include/spot_driver/mock/mock_tf_interface.hpp similarity index 87% rename from spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_tf_interface.hpp rename to spot_driver/test/include/spot_driver/mock/mock_tf_interface.hpp index bc29a0d1d..bbb096c52 100644 --- a/spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_tf_interface.hpp +++ b/spot_driver/test/include/spot_driver/mock/mock_tf_interface.hpp @@ -2,7 +2,7 @@ #include -#include +#include #include #include diff --git a/spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_timer_interface.hpp b/spot_driver/test/include/spot_driver/mock/mock_timer_interface.hpp similarity index 90% rename from spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_timer_interface.hpp rename to spot_driver/test/include/spot_driver/mock/mock_timer_interface.hpp index d203ac44e..6f392f91a 100644 --- a/spot_driver_cpp/test/include/spot_driver_cpp/mock/mock_timer_interface.hpp +++ b/spot_driver/test/include/spot_driver/mock/mock_timer_interface.hpp @@ -2,7 +2,7 @@ #include -#include +#include #include #include diff --git a/spot_driver_cpp/test/include/spot_driver_cpp/rclcpp_test.hpp b/spot_driver/test/include/spot_driver/rclcpp_test.hpp similarity index 100% rename from spot_driver_cpp/test/include/spot_driver_cpp/rclcpp_test.hpp rename to spot_driver/test/include/spot_driver/rclcpp_test.hpp diff --git a/spot_driver/test/test_copyright.py b/spot_driver/test/pytests/test_copyright.py similarity index 100% rename from spot_driver/test/test_copyright.py rename to spot_driver/test/pytests/test_copyright.py diff --git a/spot_driver/test/test_pep257.py b/spot_driver/test/pytests/test_pep257.py similarity index 100% rename from spot_driver/test/test_pep257.py rename to spot_driver/test/pytests/test_pep257.py diff --git a/spot_driver/test/test_power_management.py b/spot_driver/test/pytests/test_power_management.py similarity index 100% rename from spot_driver/test/test_power_management.py rename to spot_driver/test/pytests/test_power_management.py diff --git a/spot_driver/test/test_ros_interfaces.py b/spot_driver/test/pytests/test_ros_interfaces.py similarity index 100% rename from spot_driver/test/test_ros_interfaces.py rename to spot_driver/test/pytests/test_ros_interfaces.py diff --git a/spot_driver_cpp/test/src/conversions/test_common_conversions.cpp b/spot_driver/test/src/conversions/test_common_conversions.cpp similarity index 98% rename from spot_driver_cpp/test/src/conversions/test_common_conversions.cpp rename to spot_driver/test/src/conversions/test_common_conversions.cpp index 1766655ca..85c8e7ad2 100644 --- a/spot_driver_cpp/test/src/conversions/test_common_conversions.cpp +++ b/spot_driver/test/src/conversions/test_common_conversions.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. #include -#include +#include #include diff --git a/spot_driver_cpp/test/src/conversions/test_kinematic_conversions.cpp b/spot_driver/test/src/conversions/test_kinematic_conversions.cpp similarity index 99% rename from spot_driver_cpp/test/src/conversions/test_kinematic_conversions.cpp rename to spot_driver/test/src/conversions/test_kinematic_conversions.cpp index 1c9aac161..d7e87e3c8 100644 --- a/spot_driver_cpp/test/src/conversions/test_kinematic_conversions.cpp +++ b/spot_driver/test/src/conversions/test_kinematic_conversions.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. #include -#include +#include #include diff --git a/spot_driver_cpp/test/src/images/test_spot_image_publisher.cpp b/spot_driver/test/src/images/test_spot_image_publisher.cpp similarity index 95% rename from spot_driver_cpp/test/src/images/test_spot_image_publisher.cpp rename to spot_driver/test/src/images/test_spot_image_publisher.cpp index 95ed17178..c18e06e78 100644 --- a/spot_driver_cpp/test/src/images/test_spot_image_publisher.cpp +++ b/spot_driver/test/src/images/test_spot_image_publisher.cpp @@ -2,14 +2,14 @@ #include -#include -#include -#include - -#include -#include -#include -#include +#include +#include +#include + +#include +#include +#include +#include #include #include diff --git a/spot_driver_cpp/test/src/images/test_spot_image_publisher_node.cpp b/spot_driver/test/src/images/test_spot_image_publisher_node.cpp similarity index 94% rename from spot_driver_cpp/test/src/images/test_spot_image_publisher_node.cpp rename to spot_driver/test/src/images/test_spot_image_publisher_node.cpp index 44de8bb5e..4533889fb 100644 --- a/spot_driver_cpp/test/src/images/test_spot_image_publisher_node.cpp +++ b/spot_driver/test/src/images/test_spot_image_publisher_node.cpp @@ -2,14 +2,14 @@ #include -#include -#include - -#include -#include -#include -#include -#include +#include +#include + +#include +#include +#include +#include +#include #include #include diff --git a/spot_driver_cpp/test/src/images/test_spot_image_sources.cpp b/spot_driver/test/src/images/test_spot_image_sources.cpp similarity index 99% rename from spot_driver_cpp/test/src/images/test_spot_image_sources.cpp rename to spot_driver/test/src/images/test_spot_image_sources.cpp index 5b5df44cf..4c3748b3f 100644 --- a/spot_driver_cpp/test/src/images/test_spot_image_sources.cpp +++ b/spot_driver/test/src/images/test_spot_image_sources.cpp @@ -2,8 +2,8 @@ #include -#include -#include +#include +#include #include namespace { diff --git a/spot_driver_cpp/test/src/kinematic/test_kinematic_service.cpp b/spot_driver/test/src/kinematic/test_kinematic_service.cpp similarity index 94% rename from spot_driver_cpp/test/src/kinematic/test_kinematic_service.cpp rename to spot_driver/test/src/kinematic/test_kinematic_service.cpp index faf87d05a..d62603050 100644 --- a/spot_driver_cpp/test/src/kinematic/test_kinematic_service.cpp +++ b/spot_driver/test/src/kinematic/test_kinematic_service.cpp @@ -4,10 +4,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/spot_driver_cpp/test/src/rclcpp_test.cpp b/spot_driver/test/src/rclcpp_test.cpp similarity index 90% rename from spot_driver_cpp/test/src/rclcpp_test.cpp rename to spot_driver/test/src/rclcpp_test.cpp index 6e1dde7fe..466b96bfb 100644 --- a/spot_driver_cpp/test/src/rclcpp_test.cpp +++ b/spot_driver/test/src/rclcpp_test.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2023 Boston Dynamics AI Institute LLC. All rights reserved. -#include +#include namespace spot_ros2::test { RclcppTest::RclcppTest() : is_rclcpp_initialized_{rclcpp::ok()} {} diff --git a/spot_driver_cpp/test/src/test_parameter_interface.cpp b/spot_driver/test/src/test_parameter_interface.cpp similarity index 98% rename from spot_driver_cpp/test/src/test_parameter_interface.cpp rename to spot_driver/test/src/test_parameter_interface.cpp index bb9f8187f..2b2daf49f 100644 --- a/spot_driver_cpp/test/src/test_parameter_interface.cpp +++ b/spot_driver/test/src/test_parameter_interface.cpp @@ -5,8 +5,8 @@ #include #include #include -#include -#include +#include +#include #include diff --git a/spot_driver_cpp/LICENSE b/spot_driver_cpp/LICENSE deleted file mode 100644 index aa696ca44..000000000 --- a/spot_driver_cpp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Boston Dynamics AI Institute - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/spot_driver_cpp/README.md b/spot_driver_cpp/README.md deleted file mode 100644 index a44672cd5..000000000 --- a/spot_driver_cpp/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# spot_driver_cpp - -This package provides ROS 2 nodes to interact with Spot through its C++ SDK. - -## Why C++? - -The Spot C++ SDK is more performant than the Spot Python SDK for some operations. - -For example, the Spot C++ SDK's image client can retrieve images from all Spot's RGB and depth cameras at close to their native refresh rate of 15Hz. - -In constrast, the Spot Python SDK's image client slows substantially when requesting images from multiple depth cameras at once, and it can only maintain around 1Hz when requesting images from all RGB and depth cameras at once. diff --git a/spot_driver_cpp/package.xml b/spot_driver_cpp/package.xml deleted file mode 100644 index da7b6bfb6..000000000 --- a/spot_driver_cpp/package.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - spot_driver_cpp - 0.0.0 - C++ ROS 2 driver nodes for Spot. - BD AI Institute - MIT - - ament_cmake - - spot_msgs - bosdyn - rclcpp - rclcpp_components - geometry_msgs - sensor_msgs - tf2_ros - tl_expected - - - ament_cmake_gmock - - - ament_cmake - -