Inverse Kinematics checking for 6DOF robot

Hi,

I am trying to set a Pose in 3D space, so the robot can set the joints to achieve that pose. I have a simple function to do that, passing the Pose Matrix. However, there’s no guarantee the robot can achieve that configuration. I’d like a way to test is that point is valid within the joints values from the robot.



private List<List> FindJointsConf(IRobot robot, Matrix matrix)
{
IMotionInterpolator motionInterpolator = robot.RobotController.CreateMotionInterpolator();
IMotionTarget motionTarget = robot.RobotController.CreateTarget();

Matrix toolTCP = new Matrix();
toolTCP.SetP(new Vector3(0, 0, 120));

//Picking target
motionTarget.TargetMatrix = matrix;
motionTarget.TargetMode = TargetMode.World;
motionTarget.ToolMatrix = toolTCP;
motionTarget.MotionType = MotionType.Joint;
motionInterpolator.AddTarget(motionTarget);

List<List> joints = new List<List>();
foreach (IMotionTarget t in motionInterpolator.Targets)
{
joints.Add(new List { t.GetAllJointValues()[0],
t.GetAllJointValues()[1],
t.GetAllJointValues()[2],
t.GetAllJointValues()[3],
t.GetAllJointValues()[4],
t.GetAllJointValues()[5] });
}
motionInterpolator.Dispose();

return joints;
}


Thanks a lot,

André Castro.

Looks like this went unnoticed, sorry. The interpolator should provide a GetConfigWarning or GetConfigWarnings method for indicated the status or reachability of the target matrix given the robot’s configurations. From there, you could assign the robot a configuration that is solvable and safe for the position.

In Python API, there is now a forwardKin() method in vcPythonKinematics that makes it super easy to calculate forward kinematics. You also have the option to create a Jacobian object that can calculate forward kinematics as well as inverse kinematics with minimal code. There will be tutorials about these new features introduced in 4.1 coming soon along with a tutorial specifically about configuration warnings.

I mostly use Python, so not sure what the .NET counterparts are for all of this.

Hi,

many thanks for the reply, @zetsy. I guess it’s easy to reuse and adapt the code in Python in C#. Will be trying that!

Cheers!

André Castro.