timesync 初步做好

This commit is contained in:
2026-03-26 17:19:38 +08:00
parent 1d49ca12e9
commit 5374e2b9d9
11 changed files with 469 additions and 164 deletions
+17
View File
@@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.8)
project(fc_interfaces)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rosidl_default_generators REQUIRED)
rosidl_generate_interfaces(${PROJECT_NAME}
"srv/MavPing.srv"
"srv/MavCommandLong.srv"
)
ament_package()
+21
View File
@@ -0,0 +1,21 @@
<?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>fc_interfaces</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<maintainer email="chiyu1468@hotmail.com">picars</maintainer>
<license>TODO: License declaration</license>
<buildtool_depend>ament_cmake</buildtool_depend>
<build_depend>rosidl_default_generators</build_depend>
<member_of_group>rosidl_interface_packages</member_of_group>
<exec_depend>rosidl_default_runtime</exec_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<export>
<build_type>ament_cmake</build_type>
</export>
</package>
+18
View File
@@ -0,0 +1,18 @@
# Request
uint8 target_sysid
uint8 target_compid
uint16 command
uint8 confirmation
float32 param1
float32 param2
float32 param3
float32 param4
float32 param5
float32 param6
float32 param7
float32 timeout_sec
---
# Response
bool success
string message
uint8 ack_result
+9
View File
@@ -0,0 +1,9 @@
# Request
uint8 target_sysid
uint8 target_compid
uint8 ping_seq
---
# Response
bool success
string message
float32 rtt_ms