Skip to content

Add feature publish empty error-id topic in no error#298

Open
tmksat wants to merge 3 commits intohumblefrom
feat/publish-empty-error-id-with-no-error
Open

Add feature publish empty error-id topic in no error#298
tmksat wants to merge 3 commits intohumblefrom
feat/publish-empty-error-id-with-no-error

Conversation

@tmksat
Copy link
Contributor

@tmksat tmksat commented Aug 6, 2025

Overview

I will implement a function that allows you to confirm that the MG400 has recovered from an error state simply by subscribing to the “error_id” topic. To do this, we will publish an empty “error_id” topic when the system recovers from an error state.

Solution

  • Add parameter "allow_publish_empty_error_id" to enable this function. Default is true.
  • In the onErrorTimer handler, if the current status of MG400 does not indicate an error and the previous check indicated an error, publish an empty error_id topic.

Test

  1. Start up the MG400 main unit.

  2. Launch MG400_ROS2.

ros2 launch mg400_bringup main.launch.py
  1. Subscribe to the “error_id” topic using a command
ros2 topic echo /mg400/error_id
  1. Press the emergency stop button.

  2. Call "clear_error" service.

ros2 service call /mg400/clear_error mg400_msgs/srv/ClearError {}\ 
  1. Confirm that the empty “error_id” topic is being published once.
.
.
.
.
controller:
  ids:
  - 85
servo:
- ids: []
- ids: []
- ids: []
- ids: []
- ids: []

<---- call service "clear_error"

controller:
  ids: []
servo:
- ids: []
- ids: []
- ids: []
- ids: []
- ids: []
---

@tmksat tmksat self-assigned this Aug 6, 2025
@tmksat tmksat added the WIP Work in progress label Aug 6, 2025
@tmksat tmksat added TESTING Trigger for CI and removed WIP Work in progress labels Aug 6, 2025
@tmksat tmksat requested a review from ynyBonfennil August 6, 2025 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TESTING Trigger for CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant