Reorganize URDF packages, fix mesh resolution, enhance gravity comp controller - #27
Closed
Yang-Ci wants to merge 2 commits into
Closed
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).
Contributor
Author
|
Superseded by #28, which combines the original URDF and gravity-controller changes with the new YAML profiles and robust RobStride velocity-lock implementation. |
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 reorganizes the URDF packages, fixes a mesh resolution bug, and enhances the gravity compensation controller with new tuning parameters.
Changes
URDF Package Reorganization
urdf/00-arm-rs_asm-v3/(old RS) andurdf/reBot-DevArm_fixend_description/(old DM). Neither was referenced by any code outside theurdf/directory.urdf/DM/withReBot_Arm_DM.urdffeaturing separated visual/collision meshes, multi-material colored visuals, and gripper finger definitions (prismatic joints with mimic coupling).urdf/RS/withReBot_Arm_RS.urdfand organized mesh directories (visual/,shared/,mujoco_collision/).urdf_pathinconfig/rebotarm_dm.yaml,config/rebotarm_rs.yaml, andtools/gravity_calibration/*.pyto point to the new package paths.Mesh Resolution Fix
_resolve_urdf()inrobot_model.pyreturned a single package directory derived from the URDF path. This broke when a URDF mixed two mesh-path conventions:../meshes/...(relative to URDF dir) andmeshes/...(relative to package root).package_dirs, so Pinocchio resolves either convention without per-URDF workarounds.example/sim/visualizer.py.Gravity Compensation Controller Enhancements
tau_scale: per-joint gravity torque scaling to correct model-vs-hardware mass/inertia bias.transition_duration: smooth gain fade-in from stiff hold to compliant gravity-comp gains, preventing sudden stiffness loss at startup.joint_direction: per-joint sign correction for motor/URDF axis mismatches.hold_kp/hold_kd: stiff position hold gains;end()now maintains the current pose with stiff gains + gravity feedforward instead of simply disconnecting.gravity_compensationconfig sections to both DM and RS YAML files with calibratedtau_scalevalues.Config Tuning
rebotarm.yamlfrom DM to RS.POS_VEL pos_kpfor joints 4-6 inrebotarm_dm.yaml(50 -> 70/60/60).Additional Fixes