Skip to content

Commit

Permalink
feat: Add interface package (#16)
Browse files Browse the repository at this point in the history
Adds a temporary sample interface package to provide custom ros messages and
services.
  • Loading branch information
philipp-caspers authored Jul 4, 2024
1 parent 81eabaa commit e9d0a47
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 0 deletions.
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

0 comments on commit e9d0a47

Please sign in to comment.