static void Main(string[] args) { string MyValidPassword = "******"; C2CS.CartesianPosition pose = new C2CS.CartesianPosition(); pose.InitStruct(); C2CS.TrajectoryPoint tp = new C2CS.TrajectoryPoint(); tp.InitStruct(); try { int result = InitAPI(); RefresDevicesList(); MoveHome(); SetCartesianControl(); GetCartesianPosition(ref pose); tp.Position.CartesianPosition.X = pose.Coordinates.X - 0.10f; tp.Position.CartesianPosition.Y = pose.Coordinates.Y; tp.Position.CartesianPosition.Z = pose.Coordinates.Z; tp.Position.CartesianPosition.ThetaX = pose.Coordinates.ThetaX; tp.Position.CartesianPosition.ThetaY = pose.Coordinates.ThetaY; tp.Position.CartesianPosition.ThetaZ = pose.Coordinates.ThetaZ; tp.Position.Fingers.Finger1 = pose.Fingers.Finger1; tp.Position.Fingers.Finger2 = pose.Fingers.Finger2; tp.Position.Fingers.Finger3 = pose.Fingers.Finger3; SendBasicTrajectory(tp); int result2 = CloseAPI(); } catch (Exception ex) { System.Console.WriteLine("Exception during execution of the example. Verify " + "your API installation, verify if your Jaco is " + "connected and verify that " + "you have a valid password."); } System.Console.WriteLine("End of the example..."); System.Console.ReadKey(); }
public static extern int SendBasicTrajectory(C2CS.TrajectoryPoint tp);