Skip to content

Document StateHold hold position threshold ROS 2 parameters - #30

Merged
legubiao merged 1 commit into
mainfrom
cursor/doc-hold-thresholds-97f1
Oct 19, 2026
Merged

legubiao merged 1 commit into
mainfrom
cursor/doc-hold-thresholds-97f1

Conversation

@legubiao

Copy link
Copy Markdown
Contributor

Add the two missing HOLD joint-position thresholds to the Sphinx controller / ROS 2 parameter docs (English source + zh_CN gettext).

What landed

  • Shared Hold table next to Home in Configure ROS 2 controller parameters: hold_first_check_position_threshold and hold_position_threshold.
  • Cross-links from the Basic Joint and OCS2 Arm tables in Controller ROS 2 parameters.
  • Runtime tags: StateHold::updateParam() re-reads both keys on HOLD enter and each HOLD run (get_parameter), same pattern as Home / MoveJ.

Source (not invented)

Verified at arms_ros2_control pin 9a1da3ba:

Units are radians (absolute joint-position difference). On HOLD enter, targets start as last-sent commands. The first-check key is used only once after enter (retarget to measured positions if any joint exceeds it, to avoid a startup jump; ≤ 0 skips). After that, hold_position_threshold retargets for safety if the error exceeds it (≤ 0 disables automatic adjustment).

These two keys are not in the #120 common README Home / MoveJ tables; names and defaults come from auto_declare at the pin.

ocs2_wbc_controller is a private submodule and was not readable here, so this PR does not list WBC declare sites. After access, that package README remains the WBC parameter list.

Checks

  • make html / make html-zh_CN
  • python3 scripts/check_zh_coverage.py --threshold 95 (100%)
  • python3 scripts/check_zh_mix.py and HTML pass

Ready for review; please merge when satisfied.

Open in Web Open in Cursor 

Add hold_first_check_position_threshold and hold_position_threshold
to the shared controller parameter tables, matching StateHold.cpp
and auto_declare sites on BasicJointController and Ocs2ArmController.

Co-authored-by: HUANG ZHENBIAO <legubiao@users.noreply.github.com>
@legubiao
legubiao merged commit eed80d2 into main Oct 19, 2026
2 checks passed
@legubiao
legubiao deleted the cursor/doc-hold-thresholds-97f1 branch October 19, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants