-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add planar arm safety factor #267
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good, but one thing I think we missed in our discussion. The set point should always be within the allowed region, so we should perform the same check (check if outside the allowed radius and if so then correct it) in set_setpoint()
as well. Since we'll be doing the same check twice we should factor out that logic into a method called adjust_setpoint()
or something. Lmk if you have any questions!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly good, just a few more edits needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one last thing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok this should be the last thing! After fixing this let's get this tested and then merged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good comments and documentation! Realized we missed a minor logic bug in the constructor, and then some minor notes in the testcase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Nice job on this
* Added safetyFactor check * Move safety factor constant into Constants * Add safetyFactor range limit assertion * Update planar arm tests to use safety factor * Set setpoint in safety factor test * Test overreaching arm is normalized * Bound resolved joint pos within safety factor * Added within factor test * Try shorter extension * Improved formatting * Remove now-obsolete todo * More formatting fixes * Use std abs over fabs in test * Move vector normalization code to own func * Add more logic to normalizeVectorWithinRadius * Fix return type * Add normalize functionality to set_setpoint * Actually compute unnormalized setpoint instead of magic num * Make normalizeVector private * Rename input vector to better reflect end effector * Make normalize func name more descriptive * Add actual vector comparison * Refactored redundant code * Remove unnecessary checks * Minor cleanup * Fixed tests * More cleanup * Improve formatting * More formatting improvements * Rm unnecessary INFO wrapping * Remove unused constant * Improve REQUIRE logging * Add safety factor logic in PlanarArmController constructor
Add overall length percentage bound to planar arm joints to prevent singularity lockup.