Reorganize URDF packages and improve configurable gravity compensation - #28
Merged
ZhuYaoHui1998 merged 3 commits intoAug 31, 2026
Merged
Conversation
…ontroller URDF package reorganization: - Remove obsolete packages urdf/00-arm-rs_asm-v3/ (old RS) and urdf/reBot-DevArm_fixend_description/ (old DM). Neither was referenced by any code outside the urdf/ directory. - Add urdf/DM/ with ReBot_Arm_DM.urdf featuring separated visual/collision meshes, multi-material colored visuals, and gripper finger definitions (prismatic joints with mimic coupling). - Add urdf/RS/ with ReBot_Arm_RS.urdf and organized mesh directories (visual/, shared/, mujoco_collision/). - Update urdf_path in config/rebotarm_dm.yaml and rebotarm_rs.yaml, plus tools/gravity_calibration/*.py references, to the new package paths. Mesh resolution fix: - _resolve_urdf() in robot_model.py returned a single package directory derived from the URDF path. This broke when a URDF mixed two mesh-path conventions: "../meshes/..." (relative to URDF dir) and "meshes/..." (relative to package root). - Now returns both the URDF directory and its parent as package_dirs so Pinocchio resolves either convention without per-URDF workarounds. - Apply the same fix to example/sim/visualizer.py. Gravity compensation controller enhancements: - Add tau_scale (per-joint gravity torque scaling) to correct model-vs- hardware mass/inertia bias. - Add transition_duration for smooth gain fade-in from stiff hold to compliant gravity-comp gains, preventing sudden stiffness loss at startup. - Add joint_direction (per-joint sign correction) for motor/URDF axis mismatches. - Add hold_kp/hold_kd for stiff position hold; end() now maintains the current pose with stiff gains + gravity feedforward instead of simply disconnecting the robot. - Add gravity_compensation config sections to both DM and RS YAML files with calibrated tau_scale values. - Update example scripts (9, 10) to use the new controller parameters. Config tuning: - Switch default hardware in rebotarm.yaml from DM to RS. - Tune POS_VEL pos_kp for joints 4-6 in rebotarm_dm.yaml (50 -> 70/60/60).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR supersedes #27 and combines the URDF/package cleanup with the latest RS gravity-compensation work.
Changes
Validation
Hardware-in-the-loop validation has not been run.