clean up lot of stuff

This commit is contained in:
2026-03-22 15:49:13 +01:00
parent d3ed1c25ad
commit ca0e7b8b03
37 changed files with 3613 additions and 1223 deletions

View File

@@ -10,7 +10,7 @@ encoder:
# counts_per_rev = ppr × gear_ratio × 4 (quadrature) = 1320
safety:
max_motor_angle_deg: 90.0 # hard termination limit (0 = disabled)
max_motor_angle_deg: 90.0 # hard termination limit (physical endstop ~70-80°)
soft_limit_deg: 40.0 # progressive penalty ramp starts here
reset:

View File

@@ -1,20 +1,21 @@
# Tuned robot config — generated by src.sysid.optimize
# Original: robot.yaml
# Run `python -m src.sysid.visualize` to compare real vs sim.
urdf: rotary_cartpole.urdf
actuators:
- joint: motor_joint
type: motor
gear: 0.176692
ctrl_range:
- -1.0
- 1.0
damping: 0.009505
filter_tau: 0.040906
gear: [0.424182, 0.425031] # torque constant [pos, neg] (motor sysid)
ctrl_range: [-0.592, 0.592] # effective control bound (sysid-tuned)
deadzone: [0.141291, 0.078015] # L298N min |ctrl| for torque [pos, neg]
damping: [0.002027, 0.014665] # viscous damping [pos, neg]
frictionloss: [0.057328, 0.053355] # Coulomb friction [pos, neg]
filter_tau: 0.005035 # 1st-order actuator filter (motor sysid)
viscous_quadratic: 0.000285 # velocity² drag
back_emf_gain: 0.006758 # back-EMF torque reduction
joints:
motor_joint:
armature: 0.001389
frictionloss: 0.002179
armature: 0.002773 # reflected rotor inertia (motor sysid)
frictionloss: 0.0 # handled by motor model via qfrc_applied
pendulum_joint:
damping: 6.1e-05
damping: 0.000119
frictionloss: 1.0e-05

View File

@@ -26,8 +26,8 @@
</joint>
<link name="arm">
<inertial>
<origin xyz="0.014950488360794875 0.006089886527968399 0.004470745447817278" rpy="0 0 0" />
<mass value="0.012391951282440451" />
<origin xyz="-0.0071030505291264975 0.0008511826488989179 0.007952020186701035" rpy="0 0 0" />
<mass value="0.02110029934220782" />
<inertia ixx="2.70e-06" iyy="7.80e-07" izz="2.44e-06" ixy="0.0" iyz="7.20e-08" ixz="0.0" />
</inertial>
<visual>
@@ -53,9 +53,9 @@
</joint>
<link name="pendulum">
<inertial>
<origin xyz="0.06432778588634695 -0.05999895841669392 0.0008769789937631209" rpy="0 0 0" />
<mass value="0.035508993892747365" />
<inertia ixx="3.139576982078822e-05" iyy="9.431951659638859e-06" izz="4.07315891863556e-05" ixy="-1.8892943833253423e-06" iyz="0.0" ixz="0.0" />
<origin xyz="0.060245187591695615 -0.07601707109312682 -0.0034636702158137786" rpy="0 0 0" />
<mass value="0.03936742845036306" />
<inertia ixx="6.202768755990066e-05" iyy="3.70078470430685e-05" izz="7.827356811788924e-05" ixy="-6.925117819616428e-06" iyz="0.0" ixz="0.0" />
</inertial>
<visual>
<origin xyz="0.006895 -0.023224 -0.162953" rpy="0 0 0" />

View File

@@ -1,70 +0,0 @@
{
"best_params": {
"arm_mass": 0.012391951282440451,
"arm_com_x": 0.014950488360794875,
"arm_com_y": 0.006089886527968399,
"arm_com_z": 0.004470745447817278,
"pendulum_mass": 0.035508993892747365,
"pendulum_com_x": 0.06432778588634695,
"pendulum_com_y": -0.05999895841669392,
"pendulum_com_z": 0.0008769789937631209,
"pendulum_ixx": 3.139576982078822e-05,
"pendulum_iyy": 9.431951659638859e-06,
"pendulum_izz": 4.07315891863556e-05,
"pendulum_ixy": -1.8892943833253423e-06,
"actuator_gear": 0.17669161390939517,
"actuator_filter_tau": 0.040905643692382504,
"motor_damping": 0.009504542103348917,
"pendulum_damping": 6.128535042404019e-05,
"motor_armature": 0.0013894759540138252,
"motor_frictionloss": 0.002179448047511452
},
"best_cost": 0.7471380533090072,
"recording": "/Users/victormylle/Library/CloudStorage/SeaDrive-VictorMylle(cloud.optimize-it.be)/My Libraries/Projects/AI/RL-Framework/assets/rotary_cartpole/recordings/capture_20260311_215608.npz",
"param_names": [
"arm_mass",
"arm_com_x",
"arm_com_y",
"arm_com_z",
"pendulum_mass",
"pendulum_com_x",
"pendulum_com_y",
"pendulum_com_z",
"pendulum_ixx",
"pendulum_iyy",
"pendulum_izz",
"pendulum_ixy",
"actuator_gear",
"actuator_filter_tau",
"motor_damping",
"pendulum_damping",
"motor_armature",
"motor_frictionloss"
],
"defaults": {
"arm_mass": 0.01,
"arm_com_x": 5e-05,
"arm_com_y": 0.0065,
"arm_com_z": 0.00563,
"pendulum_mass": 0.015,
"pendulum_com_x": 0.1583,
"pendulum_com_y": -0.0983,
"pendulum_com_z": 0.0,
"pendulum_ixx": 6.16e-06,
"pendulum_iyy": 6.16e-06,
"pendulum_izz": 1.23e-05,
"pendulum_ixy": 6.1e-06,
"actuator_gear": 0.064,
"actuator_filter_tau": 0.03,
"motor_damping": 0.003,
"pendulum_damping": 0.0001,
"motor_armature": 0.0001,
"motor_frictionloss": 0.03
},
"timestamp": "2026-03-11T22:08:04.782736",
"history_summary": {
"first_cost": 3.909456214944022,
"final_cost": 0.7471380533090072,
"generations": 200
}
}