Skip to content

Commit db7c124

Browse files
Source Roboticsclaude
andcommitted
Dashboard and motor setup updates
NOTE: authored in earlier sessions, not by me, and not reviewed as part of this work. Committed at the user's request to capture the working-tree state. nicegui_test.py — ~549 lines of dashboard changes. hardware/motor_setup.py — motor configuration changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent ff00493 commit db7c124

2 files changed

Lines changed: 473 additions & 87 deletions

File tree

hardware/motor_setup.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,22 +118,31 @@ def create_joint_objects(joint_num, motor_encoder, master_position, gear_ratio,
118118
# Filter Setup
119119
# ==========================================================================
120120

121-
def initialize_filters(joint_num, alpha_speed=0.15, alpha_torque=0.25):
121+
def initialize_filters(
122+
joint_num,
123+
alpha_speed=0.15,
124+
alpha_torque=0.25,
125+
alpha_tcp_acceleration=0.15,
126+
):
122127
"""
123128
Initialize filter arrays and parameters.
124129
125130
Args:
126131
joint_num (int): Number of joints
127132
alpha_speed (float): Smoothing factor for speed filter (default: 0.15)
128133
alpha_torque (float): Smoothing factor for torque filter (default: 0.25)
134+
alpha_tcp_acceleration (float): Smoothing factor for TCP acceleration
129135
130136
Returns:
131137
dict: Dictionary containing filter arrays and parameters
132138
"""
133139
filters = {
134140
'joint_speed_filtered': np.zeros(joint_num, dtype=float),
141+
'tcp_acceleration_filtered': np.zeros(6, dtype=float),
142+
'tcp_acceleration_filter_initialized': np.zeros(1, dtype=bool),
135143
'joint_torque_filtered': np.zeros(joint_num, dtype=float),
136144
'alpha_Speed': alpha_speed,
145+
'alpha_TCP_acceleration': alpha_tcp_acceleration,
137146
'alpha_Torque': alpha_torque
138147
}
139148

0 commit comments

Comments
 (0)