V-Sekai / many_bone_ik

A custom inverse kinematics system solver for multi-chain skeletons and with constraints.
MIT License
35 stars 10 forks source link

Add better testing to many bone ik #18

Closed fire closed 1 year ago

fire commented 1 year ago

Is your feature request related to a problem? Please describe. This ik solver isn't robust enough.

Describe the solution you'd like I would like ManyBoneIK to be robust.

graph TD
    A[Define the robotic arm or character rig] --> B[Specify joint angle ranges]
    B --> C[Generate random joint configurations]
    C --> D[Calculate end effector positions using forward kinematics]
    D --> E[Store the data in a structured format]
    E --> F[Add noise -- optional]
    E --> G[Create edge cases]
    F --> H[Test the inverse kinematics system]
    G --> H
    H --> I[Split the test data]
    I --> J[Train your IK system]
    J --> K[Validate your IK system]
    K --> L[Test your IK system]
    L --> M[Analyze the results]
    M --> N[Iterate and refine]
    N --> O[Improved IK system]
  1. Split the test data: Divide the generated data into training, validation, and testing sets. This allows you to evaluate the performance of your IK system on different subsets of data and avoid overfitting.

  2. Train your IK system: Depending on the method used for solving the inverse kinematics problem, you might need to train your system using the training set. For example, if you're using a machine learning algorithm or a neural network, feed the input-output pairs -- joint configurations and end effector positions -- to the model and adjust the weights to minimize the error between the predicted and desired positions.

  3. Validate your IK system: Evaluate the performance of your IK system on the validation set. This can help you fine-tune the system's parameters and make improvements before testing on the final test set.

  4. Test your IK system: Assess the performance of your IK system on the test set. This will give you an unbiased evaluation of the system's ability to solve the inverse kinematics problem for a diverse range of joint configurations and end effector positions. Compare the predicted joint configurations with the actual joint configurations and calculate the error metrics, such as mean absolute error -- MAE -- or root mean squared error -- RMSE.

  5. Analyze the results: Examine the performance of your IK system across different test cases, particularly focusing on edge cases or situations where the system underperforms. This analysis will help you identify areas for improvement and potential limitations of your IK system.

  6. Iterate and refine: Based on the insights gained from the analysis, make necessary adjustments to your IK system, such as changing the algorithm, refining the model, or adding more training data. Repeat the testing and analysis process to continually improve the performance of your system.

Describe alternatives you've considered Don't use Many Bone Ik. Manually code.

Additional context Add any other context or screenshots about the feature request here.

fire commented 1 year ago

Close for now.