# C++代写｜HW3 – Inverse Kinematics

• ALL

Overview

• Use different bones to touch the ball
• Start bone

○The last movable bone

• End bone

○The bone that touches the ball

Objective

• Everything you need to implement is in kinematics.cpp (in src folder)
• There are three functions you need to implement in this homework

○ void forwardKinematics(…)

○Eigen::VectorXf leastSquareSolver(…)

○ void inverseKinematics(…)

• Bonus

○ Take rotation limit of bones into consideration in void inverseKinematics

• void forwardKinematics(…)

○Goal

■Implement forward kinematics, which is similiar to HW2

• Eigen::VectorXf leastSquareSolver(…)

○Goal

■Find solution of linear least squares system, which will be needed for inverse kinematics

○Hint

■You might use some pseudo-inverse methods such as SVD

■There are some built-in functions in Eigen that you can use

■Eigen::Matrix3Xf means a matrix with 3 rows and unknown columns

• Eigen::Matrix3Xf m(3, 10); // A matrix with 3 rows and 10 columns

■Eigen::VectorXf means a vector with unknown size

• Eigen::VectorXf v(10); // A vector with 10 elements
• void inverseKinematics(…)

○Goal

■Implement inverse kinematics

■We use inverse-Jacobain method in this homework

○Hint

■Review “kinematics.pptx” from p.20 – p.50

■Review “acclaim_FK_IKnote.pdf” Inverse Kinematics part

■Traverse from end bone to start bone

• Make end bone touch the ball (target)
• Start bone is the last movable bone, so you should stop at this bone

■You can check struct Bone in bone.h (in include folder)

Report

• Suggested outline

○ Introduction/Motivation

○ Fundamentals

○ Implementation

○ Result and Discussion

■How different step and epsilon affect the result

■Touch the target or not

■Least square solver

○ Bonus (Optional)

○ Conclusion

E-mail: vipdue@outlook.com  微信号:vipnxx