spot_micro_kinematics_python
spot_micro_kinematics_python copied to clipboard
sm.get_leg_angles()
Hi Mike, thank you for your great contribution to the world of quadruped robots.
sm = SpotMicroStickFigure(x=0,y=0.14,z=0)
# Define absolute position for the legs
l = sm.body_length
w = sm.body_width
l1 = sm.hip_length
l2 = sm.upper_leg_length
l3 = sm.lower_leg_length
# all four feet at a height of 0, and at a neutral stance (where the feet are directly below the hip and shoulder joints)
desired_p4_points = np.array([ [-l/2, 0, w/2 + l1],
[ l/2 , 0, w/2 + l1],
[ l/2 , 0, -w/2 - l1],
[-l/2 , 0, -w/2 - l1] ])
sm.set_absolute_foot_coordinates(desired_p4_points)
leg_angs = sm.get_leg_angles()
In the upper code the function sm.get_leg_angles() returns values that are twice as large as expected (I am using the default dimensions of the joints and body). Can somebody confirm this or am I missing some point?
Watch out almost all of the code I’ve seen to do Spot Micro IK is wrong. It does not take into concideration that the SM has shoulders and the first two joints are displaced in both Y and Z. The origin of this seems to be using an example code from a robot that has both joints intersecting at a point. It’s a small error but needs to be fixed in many SM implementations. You can see. my solution, in Python, GitHub username “chrisalbertson"
On Nov 12, 2023, at 11:09 AM, MarekVuizk @.***> wrote:
Thanks
пн, 13 нояб. 2023 г., 08:38 Chris Albertson @.***>:
Watch out almost all of the code I’ve seen to do Spot Micro IK is wrong. It does not take into concideration that the SM has shoulders and the first two joints are displaced in both Y and Z. The origin of this seems to be using an example code from a robot that has both joints intersecting at a point. It’s a small error but needs to be fixed in many SM implementations. You can see. my solution, in Python, GitHub username “chrisalbertson"
On Nov 12, 2023, at 11:09 AM, MarekVuizk @.***> wrote:
— Reply to this email directly, view it on GitHub https://github.com/mike4192/spot_micro_kinematics_python/issues/6#issuecomment-1807507339, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ2YGENNNRK3RMCSRR4UN33YEGW5FAVCNFSM6AAAAAASE3N5SWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXGUYDOMZTHE . You are receiving this because you commented.Message ID: @.***>