Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add interface package #16

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions voraus_ros_interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
cmake_minimum_required(VERSION 3.5)

project(voraus_ros_interfaces)

# 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_package(ament_cmake REQUIRED)
find_package(rosidl_default_generators REQUIRED)

set(msg_files
"msg/Voraus.msg"
"srv/Voraus.srv"
)

rosidl_generate_interfaces(${PROJECT_NAME}
${msg_files}
)

ament_export_dependencies(rosidl_default_runtime)

ament_package()
5 changes: 5 additions & 0 deletions voraus_ros_interfaces/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This is a ros package without any rust code for providing the necessary message and service types.
It will probably be autogenerated in the future. It is needed for the compilation of the voraus-ros-bridge and
all its ros consumers.
As this package will be generated from the OPC UA spec it will move to either the voraus components or to the release
such that a preconfigured rosbridge can be shipped.
11 changes: 11 additions & 0 deletions voraus_ros_interfaces/msg/Voraus.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Primitive types
bool bool_member true
int8 int8_member 1
uint8 uint8_member 2
byte byte_member 3
float32 float32_member 1e-2

# Array/sequence of primitive type
float32[3] float_array [1.0, 2.0, 3.0]
float32[<=3] float_seq_bounded [4.0, 5.0]
float32[] float_seq_unbounded [6.0]
20 changes: 20 additions & 0 deletions voraus_ros_interfaces/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<package format="3">
<name>voraus_ros_interfaces</name>
<version>0.0.1</version>
<description>Defines custom ros message/service types for the voraus-ros-bridge</description>
<maintainer email="[email protected]">user</maintainer>
<license>MIT</license>

<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>rosidl_default_generators</buildtool_depend>

<exec_depend>rosidl_default_runtime</exec_depend>

<test_depend>ament_lint_common</test_depend>

<member_of_group>rosidl_interface_packages</member_of_group>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
5 changes: 5 additions & 0 deletions voraus_ros_interfaces/srv/Voraus.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
int64 a
int64 b
int64 c
---
int64 sum