Kinovarobotics / Kinova-kortex2_Gen3_G3L

Code examples and API documentation for KINOVA® KORTEX™ robotic arms
https://www.kinovarobotics.com/
Other
114 stars 84 forks source link

Is there a way to send a rotationMatrix (or quaternion) as a orientaion command to the robot? #184

Closed xtimberlake closed 1 week ago

xtimberlake commented 1 year ago

Summary

Is there a way to send a rotationMatrix (or quaternion) as a orientaion command to the robot?

Use case

I am currently devolping with Kinova gen3 robot arm. As written in the User Guide doc:

The orientation representation uses an x-y-z extrinsic convention.

Hence I need to send the Euler angle [theta_x, theta_y, and theta_z] as a target pose, which is not intuitive to me. (Especially, the default orientation of the end-effetor is alinged with the base's) What if I want to specify a rotationMatrix or quaternion as the orientation command?

Additional context

This problem can be described as "Given a rotationMatrix R, slove for Euler angles [thetax, thetay, thetaz]". Do I have to solve by my own?

martinleroux commented 1 week ago

Hi @xtimberlake ,

There is no way to send orientation commands to the robot other than via euler angles (Twist commands use the axis/angle method).

You can either implement the math yourself (it is a solved problem in most robotics textbooks) or use a 3rd party library to do so - I can recommend roboticslibrary.org for C++ or Peter Corke's Robotics Toolbox for Python