hivecore robot interfaces

This commit is contained in:
2025-09-29 16:13:55 +08:00
parent d8258b72e9
commit 5c976f4b9f
10 changed files with 140 additions and 0 deletions

60
src/CMakeLists.txt Normal file
View File

@@ -0,0 +1,60 @@
cmake_minimum_required(VERSION 3.8)
project(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)
# uncomment the following section in order to fill in
# further dependencies manually.
# find_package(<dependency> REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(std_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(builtin_interfaces REQUIRED)
set(msg_files
msg/PoseArrayClassAndID.msg
msg/PoseClassAndID.msg
)
set(action_files
action/MoveToPosition.action
action/ArmSpaceControl.action
action/HandControl.action
action/LegControl.action
action/VisionGraspObject.action
)
set(srv_files
srv/VisionObjectRecognition.srv
)
# uncomment the following section in order to fill in
# further dependencies manually.
# find_package(<dependency> REQUIRED)
rosidl_generate_interfaces(${PROJECT_NAME}
${msg_files}
${action_files}
${srv_files}
DEPENDENCIES
std_msgs
geometry_msgs
builtin_interfaces
)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
# the following line skips the linter which checks for copyrights
# comment the line when a copyright and license is added to all source files
set(ament_cmake_copyright_FOUND TRUE)
# the following line skips cpplint (only works in a git repo)
# comment the line when this package is in a git repo and when
# a copyright and license is added to all source files
set(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()
ament_export_dependencies(rosidl_default_runtime)
ament_package()

View File

@@ -0,0 +1,10 @@
# Goal: target pose in space
# Example fields; adjust as needed for your robot
geometry_msgs/PoseStamped target
---
# Result
bool success
string message
---
# Feedback
float32 progress

View File

@@ -0,0 +1,8 @@
# Goal: hand control parameters
int32 mode # 0=open, 1=close
float32 effort
---
bool success
string message
---
float32 progress

View File

@@ -0,0 +1,7 @@
# Goal: leg control parameters
geometry_msgs/TwistStamped target
---
bool success
string message
---
float32 progress

View File

@@ -0,0 +1,12 @@
# Goal definition
float32 target_x
float32 target_y
---
# Result definition
bool success
string message
---
# Feedback definition
float32 current_x
float32 current_y
float32 progress

View File

@@ -0,0 +1,7 @@
# Goal: specify object id/name
string object_id
---
bool success
string message
---
float32 grasp_progress

View File

@@ -0,0 +1,2 @@
std_msgs/Header header
PoseClassAndID[] objects

View File

@@ -0,0 +1,4 @@
string class_name
int32 class_id
geometry_msgs/Pose[] pose_list

22
src/package.xml Normal file
View File

@@ -0,0 +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>interfaces</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<maintainer email="root@todo.todo">root</maintainer>
<license>TODO: License declaration</license>
<buildtool_depend>ament_cmake</buildtool_depend>
<build_depend>rosidl_default_generators</build_depend>
<depend>std_msgs</depend>
<depend>geometry_msgs</depend>
<exec_depend>rosidl_default_runtime</exec_depend>
<test_depend>ament_lint_auto</test_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>

View File

@@ -0,0 +1,8 @@
string camera_position
---
std_msgs/Header header
string info
bool success
interfaces/PoseClassAndID[] objects