Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

update calc_average_acceleration in utils.py #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions aist_plusplus/features/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ def calc_average_acceleration(
) / frame_time
v1 = (
positions[i + j][joint_idx]
- positions[i + j - 1][joint_idx] / frame_time
)
- positions[i + j - 1][joint_idx]
) / frame_time
average_acceleration += (v2 - v1) / frame_time
current_window += 1
return np.linalg.norm(average_acceleration / current_window)
Expand Down Expand Up @@ -180,4 +180,4 @@ def calc_average_velocity_vertical(
)
else:
raise NotImplementedError
return np.linalg.norm(average_velocity)
return np.linalg.norm(average_velocity)