add estop function
This commit is contained in:
@@ -32,6 +32,7 @@ set(msg_files
|
||||
msg/ArmMotionParams.msg
|
||||
msg/ArmError.msg
|
||||
msg/GripperStatus.msg
|
||||
msg/EStopState.msg
|
||||
)
|
||||
set(action_files
|
||||
action/MoveToPosition.action
|
||||
@@ -61,6 +62,7 @@ set(srv_files
|
||||
srv/ClearArmError.srv
|
||||
srv/InverseKinematics.srv
|
||||
srv/SetArmEnable.srv
|
||||
srv/ResetEStop.srv
|
||||
)
|
||||
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
|
||||
12
src/msg/EStopState.msg
Normal file
12
src/msg/EStopState.msg
Normal file
@@ -0,0 +1,12 @@
|
||||
# EStopState.msg
|
||||
# 急停状态广播消息(由HAL/驱动层向上游发布)
|
||||
#
|
||||
# 语义:
|
||||
# - latched=true 表示急停已触发并处于锁存态
|
||||
# - generation 每次“新触发事件”递增,便于上层检测边沿
|
||||
|
||||
builtin_interfaces/Time stamp # 状态时间戳
|
||||
bool latched # 急停锁存状态
|
||||
uint8 source # 触发源(0=unknown,1=io,2=plc,3=driver_fault,4=software)
|
||||
string reason # 触发原因文本
|
||||
uint32 generation # 触发代次(单调递增)
|
||||
@@ -3,5 +3,7 @@ string[] joint_names
|
||||
float64[] joint_positions
|
||||
bool[] joint_enabled
|
||||
int32[] joint_error_codes
|
||||
bool estop_latched
|
||||
uint32 estop_generation
|
||||
geometry_msgs/Pose left_arm_pose
|
||||
geometry_msgs/Pose right_arm_pose
|
||||
|
||||
11
src/srv/ResetEStop.srv
Normal file
11
src/srv/ResetEStop.srv
Normal file
@@ -0,0 +1,11 @@
|
||||
# ResetEStop.srv
|
||||
# 急停复位服务(用于清除上层软件锁存态)
|
||||
#
|
||||
# 注意:
|
||||
# - 该服务仅表达“复位请求”,是否允许复位由安全链路策略决定
|
||||
# - 硬件安全回路未恢复时,应返回 success=false
|
||||
|
||||
bool reset # true=请求复位,false=无效请求
|
||||
---
|
||||
bool success # true=复位成功,false=复位失败
|
||||
string message # 结果描述(失败原因/诊断信息)
|
||||
Reference in New Issue
Block a user