public TDx.TDxInput.AngleAxis Supprimer_Bruit_Rotation(TDx.TDxInput.AngleAxis rotation) { if(rotation.X > 0.1) { rotation.Y = 0; rotation.Z = 0; }else if(rotation.X < -0.1) { rotation.Y = 0; rotation.Z = 0; }else if(rotation.Y > 0.1) { rotation.X = 0; rotation.Z = 0; } else if (rotation.Y < -0.1) { rotation.X = 0; rotation.Z = 0; } else if (rotation.Z > 0.1) { rotation.X = 0; rotation.Y = 0; }else if(rotation.Z < -0.1) { rotation.X = 0; rotation.Y = 0; } return rotation; }
// Fonction permettant d'utiliser les translations et rotations de la souris et de les envoyer au Kuka public void Kuka_Move(TDx.TDxInput.Vector3D translation, TDx.TDxInput.AngleAxis rotation) { if (debug) { Console.WriteLine("je suis dans kuka move"); var Position = (new CartesianPosition { X = translation.X, Y = translation.Y, Z = translation.Z, A = rotation.X, B = rotation.Y, C = rotation.Z, }); Console.WriteLine(Position.X + " ; " + Position.Y + " ; " + Position.Z); // on envoi ces valeurs au Kuka robot.SetRelativeMovement(Position); } // on recupere les valeurs des translations et rotations de la souris 3D }
public TDx.TDxInput.Vector3D Suppimmer_Bruit_Translation(TDx.TDxInput.Vector3D translation) { if (translation.X > 500) { translation.Y = 0; translation.Z = 0; }else if(translation.X < -500) { translation.Y = 0; translation.Z = 0; }else if(translation.Y > 500) { translation.X = 0; translation.Z = 0; }else if(translation.Y < -500) { translation.X = 0; translation.Z = 0; }else if(translation.Z > 500) { translation.X = 0; translation.Y = 0; }else if(translation.Z < -500) { translation.X = 0; translation.Y = 0; } return translation; }