Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F10550608
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Size
4 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6210ef7..1798c7e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,23 +1,27 @@
cmake_minimum_required(VERSION 3.5)
project(vermin_collector_ros_msgs)
# 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(geometry_msgs REQUIRED)
find_package(std_msgs REQUIRED)
+find_package(builtin_interfaces REQUIRED)
find_package(rosidl_default_generators REQUIRED)
rosidl_generate_interfaces(${PROJECT_NAME}
-# "msg/Num.msg"
-# "msg/TargetCoordinates.msg"
-"msg/Command.msg"
-"msg/Feedback.msg"
-"msg/BeetleDetection.msg"
-DEPENDENCIES std_msgs
- )
+ "msg/Command.msg"
+ "msg/Feedback.msg"
+ "msg/BeetleDetection.msg"
+ "msg/DeviceHealth.msg"
+ "msg/DeviceStatus.msg"
+ "msg/SessionState.msg"
+ "srv/StartRecording.srv"
+ "srv/StopRecording.srv"
+ "srv/AbortRecording.srv"
+ DEPENDENCIES std_msgs builtin_interfaces
+)
ament_export_dependencies(rosidl_default_runtime)
ament_package()
diff --git a/msg/DeviceHealth.msg b/msg/DeviceHealth.msg
new file mode 100644
index 0000000..951d7bd
--- /dev/null
+++ b/msg/DeviceHealth.msg
@@ -0,0 +1,8 @@
+# Per-device health snapshot, polled and published periodically.
+string device_id
+bool ok
+float32 battery_pct # 0-100, NaN if unknown
+float32 storage_free_gb # NaN if unknown
+int8 link_quality # 0-100, -1 if unknown
+float32 temperature_c # NaN if unknown
+string notes # free-form, used for human-readable hints
diff --git a/msg/DeviceStatus.msg b/msg/DeviceStatus.msg
new file mode 100644
index 0000000..815299a
--- /dev/null
+++ b/msg/DeviceStatus.msg
@@ -0,0 +1,5 @@
+# Per-device recording status during a session.
+string device_id
+string state # "idle" | "recording" | "error"
+builtin_interfaces/Time last_ack
+string current_file # empty if none
diff --git a/msg/SessionState.msg b/msg/SessionState.msg
new file mode 100644
index 0000000..a78955d
--- /dev/null
+++ b/msg/SessionState.msg
@@ -0,0 +1,6 @@
+# Current state of the recording manager. Published on a latched topic.
+string session_id # empty when IDLE
+string state # "IDLE" | "ARMING" | "RECORDING" | "STOPPING" | "COLLECTING" | "DONE" | "FAILED"
+builtin_interfaces/Time started_at
+string[] devices
+string note
diff --git a/package.xml b/package.xml
index de92626..b554863 100644
--- a/package.xml
+++ b/package.xml
@@ -1,21 +1,22 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>vermin_collector_ros_msgs</name>
<version>0.0.1</version>
<description>custom message format for vermin collector communication to ESP32</description>
<maintainer email="alexander120400@gmail.com">user</maintainer>
<license>Apache-2.0</license>
<buildtool_depend>ament_cmake</buildtool_depend>
<depend>std_msgs</depend>
+ <depend>builtin_interfaces</depend>
<!-- <depend>geometry_msgs</depend> -->
<buildtool_depend>rosidl_default_generators</buildtool_depend>
<exec_depend>rosidl_default_runtime</exec_depend>
<member_of_group>rosidl_interface_packages</member_of_group>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<export>
<build_type>ament_cmake</build_type>
</export>
</package>
\ No newline at end of file
diff --git a/srv/AbortRecording.srv b/srv/AbortRecording.srv
new file mode 100644
index 0000000..ae8bfa0
--- /dev/null
+++ b/srv/AbortRecording.srv
@@ -0,0 +1,3 @@
+string reason
+---
+bool success
diff --git a/srv/StartRecording.srv b/srv/StartRecording.srv
new file mode 100644
index 0000000..bb14958
--- /dev/null
+++ b/srv/StartRecording.srv
@@ -0,0 +1,5 @@
+string plant_label
+---
+string session_id
+string[] accepted_devices
+string[] rejected_devices
diff --git a/srv/StopRecording.srv b/srv/StopRecording.srv
new file mode 100644
index 0000000..51d1ff2
--- /dev/null
+++ b/srv/StopRecording.srv
@@ -0,0 +1,4 @@
+string notes
+---
+string manifest_path
+bool success
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, May 31, 12:05 AM (1 d, 3 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
330790
Default Alt Text
(4 KB)
Attached To
Mode
R269 SoC_Vermin_Collector_ROS_Msgs
Attached
Detach File
Event Timeline
Log In to Comment