Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access Read Violation on Inverse Kinematics Function #42

Open
samtkeen opened this issue Jan 28, 2022 · 2 comments
Open

Access Read Violation on Inverse Kinematics Function #42

samtkeen opened this issue Jan 28, 2022 · 2 comments

Comments

@samtkeen
Copy link

When calling the InverseKinematics(Model, Qinit, ConstraintSet, Qres) I get
"Access violation reading location 0x0000000000000000."
with no indication where the violation is?
Is there an example of using the InverseKinematics function anywhere so i can check where I am missing something?

The model is imported via URDF using the AddOn, i have defined the body ids, target rotation and location, weights and used the end effector location as body_points in the constraint set and cant find any null pointers in the variables.

@ju6ge
Copy link
Contributor

ju6ge commented Jan 28, 2022

Hey, did you also pass an intialized Qres Vector to the function, that is where the result will be placed.

For an example of using InverseKinematics you can take a look at the RBDL-Toolkit Inverse Kinematics Plugin.

And just a quick note that explaining what you are doing is not as helpful as just posting the code snippet that produces the error ;). That way people can more easly see if there are any obvious mistakes ;)

@samtkeen
Copy link
Author

yes I set Qres up as a vector of zeros. Thank you for sending that link, I was trying to attempt to use the secondary version of the function which uses a constraint set and a target rotation instead though, but if i can get either version to work that would be great!

Also apologies i thought i had attached the code snippets but obviosuly missed it. I have added my attempt to use the same variation of the inverse kinematics function you have used in the toolkit which compiles and runs(see attatched zip), however it returns false on the call for Inverse Kinematics function.

Can i check that the units should be radians for angles and meters for locations as maybe this casues issue with the functions if they arent scaled properly?

IKFunctions.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants