Closed DawnQiu closed 1 month ago
Hi @DawnQiu,
Your code looks good, and from the error message, I feel like the error comes from the Inverse Kinematics computation.
Have you tried with other values for your TargetPose
and GuessAngle
?
I think that might be the issue.
I cannot test on a real Gen3-lite at the moment, but my next steps would be to try with a different TargetPose
. If it works and you absolutely need this specific target pose, I would try with different variants of GuessAngle
.
I feel like this specific pose is on the far edge of the arm's reach, so there might be an issue when computing where some values are out of bounds and the whole process fails because of it.
Best, Felix
Thank you for your response. Regarding the specific target pose you mentioned, it is actually not located at the far edge of the robot arm's reachable workspace. It is approximately the pose achieved when the third joint of the robot arm is rotated to 90 degrees. I need to perform some control tasks on this target pose, such as motion control and force control. Especially force control, where the robot will generate a new target pose based on external forces acting on the current target pose. Then, I need to convert the new target pose into joint angles using inverse kinematics, and send these angles to the robot to execute the corresponding actions. Also, do you think there could be an error in the part where IKData is assigned? I am not fully familiar with IKData. Thank you for your suggestions on this issue, and I look forward to your response. Best regards
Yeah, you wrote "third joint of the robot arm is rotated to 90 degrees" and it clicked in my head. This is a singularity between joint 4 and 6. They are both on the exact same axis so the inverse kinematics cannot be computed since there are infinite solutions.
See the singularities section in the User Guide for more details.
Basically, you cannot compute inverse kinematics for this specific pose. If you send your arm to this exact cartesian pose, you will probably have small variation on every joint angles to avoid having actuators 4 and 6 on the same axis.
Best, Felix
Dear sir,
I have encountered some issues while writing an inverse kinematics program in the Gen3Lite robot.
First, I ran the 01-compute-kinematics.cpp program, which worked successfully, and printed out the information:
Then, I refer to the program to write my own "inverse kinematics" program, the following is the source code:
In the main function, define the desired pose TargetPose and the initial guess angles GuessAngle. Call robot.ComputeInverseKinematics(TargetPose, GuessAngle) to perform the inverse kinematics calculation and store the result in the ComputedAngles vector.Use a loop to iterate over the ComputedAngles vector and print the value of each joint angle.
Finally, running the program reports the following error message:
This problem has been bothering me for several days, and I would like to know how to solve it.
Thank you very much for your response!
Best Wishes!