Skip to content
This repository was archived by the owner on Sep 16, 2025. It is now read-only.

Commit c39fe70

Browse files
committed
Custom messages
1 parent d7d4ffb commit c39fe70

5 files changed

Lines changed: 86 additions & 0 deletions

File tree

usc_demo/demo_msgs/CMakeLists.txt

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
cmake_minimum_required(VERSION 3.5)
2+
project(demo_msgs)
3+
4+
# Default to C99
5+
if(NOT CMAKE_C_STANDARD)
6+
set(CMAKE_C_STANDARD 99)
7+
endif()
8+
9+
# Default to C++14
10+
if(NOT CMAKE_CXX_STANDARD)
11+
set(CMAKE_CXX_STANDARD 14)
12+
endif()
13+
14+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
15+
add_compile_options(-Wall -Wextra -Wpedantic)
16+
endif()
17+
18+
# find dependencies
19+
find_package(ament_cmake REQUIRED)
20+
find_package(std_msgs REQUIRED)
21+
find_package(builtin_interfaces REQUIRED)
22+
find_package(rosidl_default_generators REQUIRED)
23+
24+
# uncomment the following section in order to fill in
25+
# further dependencies manually.
26+
# find_package(<dependency> REQUIRED)
27+
28+
rosidl_generate_interfaces(demo_msgs
29+
"msg/DemoDistance.msg"
30+
"msg/DemoPower.msg"
31+
"msg/DemoHih6130.msg"
32+
DEPENDENCIES std_msgs builtin_interfaces
33+
)
34+
35+
ament_export_dependencies(rosidl_default_runtime)
36+
37+
if(BUILD_TESTING)
38+
find_package(ament_lint_auto REQUIRED)
39+
# the following line skips the linter which checks for copyrights
40+
# remove the line when a copyright and license is present in all source files
41+
set(ament_cmake_copyright_FOUND TRUE)
42+
# the following line skips cpplint (only works in a git repo)
43+
# remove the line when this package is a git repo
44+
set(ament_cmake_cpplint_FOUND TRUE)
45+
ament_lint_auto_find_test_dependencies()
46+
endif()
47+
48+
ament_package()
49+
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
string board
2+
int32 heartbeats
3+
uint32 sensor_distance
4+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
int32 heartbeats
2+
int16 temp
3+
uint16 hum
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
string board
2+
uint32 power

usc_demo/demo_msgs/package.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0"?>
2+
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
3+
<package format="3">
4+
<name>demo_msgs</name>
5+
<version>0.0.0</version>
6+
<description>TODO: Package description</description>
7+
<maintainer email="amalki@piap.pl">Alexandre Malki</maintainer>
8+
<license>TODO: License declaration</license>
9+
10+
<buildtool_depend>ament_cmake</buildtool_depend>
11+
12+
<build_depend>builtin_interfaces</build_depend>
13+
<build_depend>std_msgs</build_depend>
14+
<build_depend>rosidl_default_generators</build_depend>
15+
<exec_depend>builtin_interfaces</exec_depend>
16+
<exec_depend>std_msgs</exec_depend>
17+
<exec_depend>rosidl_default_runtime</exec_depend>
18+
19+
<test_depend>ament_lint_auto</test_depend>
20+
<test_depend>ament_lint_common</test_depend>
21+
22+
<member_of_group>rosidl_interface_packages</member_of_group>
23+
24+
<export>
25+
<build_type>ament_cmake</build_type>
26+
</export>
27+
</package>
28+

0 commit comments

Comments
 (0)