# Help understanding CalculateInverseKinematics for Kinect project

I need help understanding a method for mechanism, namely CalculateInverseKinematics(RsTarget, RsToolData, Boolean, Double[]). I'm receiving data from a kinect which delivers
calculations of a distance between two targets in x-, y-, z-axis (in meters) and I want to use that direction and distance to guide a virtual robot. You can see a picture of an example at the bottom what the Kinect does, it calculates the distance between the pink dot and the center of the red marked hand. I want the pink dot to represent the virtual robot tcp's current position and the marked hand is the direction and distance I want the virtual robot to travel to.

So my following questions are: Can I use CalculateInverseKinematics mentioned above to achieve this? If so, could someone explain how it works thoroughly and how I should use it, as I'm a beginner in programming in C# for RobotStudio.

Each axis and its calculated distance is separately sent to another class for processing the data:
// Send calculated distance to the KinectData class for processing
myKinectData.DistanceX = calcDistanceX;
myKinectData.DistanceY = calcDistanceY;
myKinectData.DistanceZ = calcDistanceZ; Example of distance in x-, y-, z-axis between the
dot and red marked hand
Tagged:

• I don't know if you can use the Calcinversekinematics - but why don't just send the x,y,z to the virtual controller and then calculate the next position as follows (in psedo code):

1) Wait for data from PC(analyzed kinect data)
2) Calc current robtarget
4) Move to new Target

And do these 4 steps in a loop.

If you implement it in C# and using Robotstudio, you won't be able to send the data to a real robot etc ?

Lars

Lars Glud
Danrob A/S
• You could be right DanLars, as I said I'm still a beginner in robotstudio programming with C# so still looking for all methods Could you possibly give an example of how I can do like your example and/or there's anything I can look up in the RobotStudio 6.0 SDK reference manual?

I think if I could connect it to a Controller through RobotStudio, it is highly possible to send data to a real robot and move it, that's my end goal anyhow 