init: 导入项目到 meswork Gitea
This commit is contained in:
192
DataMirrorTools_Simulator/Foundation/Base.Class/Kinematics.cs
Normal file
192
DataMirrorTools_Simulator/Foundation/Base.Class/Kinematics.cs
Normal file
@@ -0,0 +1,192 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace KinematicsBase
|
||||
{
|
||||
#region BaseClass
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Clones the specified list.
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="List">The list.</param>
|
||||
/// <returns>List{``0}.</returns>
|
||||
[Serializable]
|
||||
public enum DeviceType
|
||||
{
|
||||
Default = 0,
|
||||
Device = 1,
|
||||
Robot = 2,
|
||||
AGV = 3,
|
||||
Gripper = 4,
|
||||
Err = 1000
|
||||
}
|
||||
[Serializable]
|
||||
/// <summary>
|
||||
/// 接受选择的模型
|
||||
/// </summary>
|
||||
public class ModelSelect
|
||||
{
|
||||
public string ModelCode { get; set; }
|
||||
public string ModelName { get; set; }
|
||||
public string tx { get; set; }
|
||||
public string ty { get; set; }
|
||||
public string rx { get; set; }
|
||||
public string ry { get; set; }
|
||||
public string rz { get; set; }
|
||||
public DeviceType DeviceTypeCode { get; set; }
|
||||
}
|
||||
[Serializable]
|
||||
public enum AxisFlag
|
||||
{
|
||||
X,
|
||||
Y,
|
||||
Z
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从一个姿态到另一个姿态是时间优先或速度有限
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public enum MoveToPosePriorType
|
||||
{
|
||||
Time,
|
||||
Velocity
|
||||
}
|
||||
[Serializable]
|
||||
public class Position
|
||||
{
|
||||
public double X { set; get; }
|
||||
public double Y { set; get; }
|
||||
public double Z { set; get; }
|
||||
}
|
||||
[Serializable]
|
||||
public class FixedAngle
|
||||
{
|
||||
public FixedAngle()
|
||||
{
|
||||
}
|
||||
|
||||
public double R { set; get; }
|
||||
public double P { set; get; }
|
||||
public double Y { set; get; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 运动约束单位矩阵
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class PositionNormalMatrix
|
||||
{
|
||||
public int x { set; get; }
|
||||
public int y { set; get; }
|
||||
public int z { set; get; }
|
||||
public int rx { set; get; }
|
||||
public int ry { set; get; }
|
||||
public int rz { set; get; }
|
||||
}
|
||||
[Serializable]
|
||||
public class Quaternion
|
||||
{
|
||||
public Quaternion()
|
||||
{
|
||||
}
|
||||
|
||||
public double X { set; get; }
|
||||
public double Y { set; get; }
|
||||
public double Z { set; get; }
|
||||
public double W { set; get; }
|
||||
}
|
||||
[Serializable]
|
||||
public class PositionFixedAngle
|
||||
{
|
||||
public PositionFixedAngle()
|
||||
{
|
||||
this.Position = new Position();
|
||||
this.FixedAngle = new FixedAngle();
|
||||
}
|
||||
public Position Position { set; get; }
|
||||
|
||||
public FixedAngle FixedAngle { set; get; }
|
||||
}
|
||||
[Serializable]
|
||||
public class PositionQuaternion
|
||||
{
|
||||
public PositionQuaternion()
|
||||
{
|
||||
this.Position = new Position();
|
||||
this.Quaternion = new Quaternion();
|
||||
}
|
||||
public Position Position { set; get; }
|
||||
public Quaternion Quaternion { set; get; }
|
||||
}
|
||||
[Serializable]
|
||||
public class PositionQuaternionWithID : PositionQuaternion
|
||||
{
|
||||
public PositionQuaternionWithID()
|
||||
{
|
||||
this.UUID = "";
|
||||
}
|
||||
public string UUID { set; get; }
|
||||
}
|
||||
|
||||
|
||||
[Serializable]
|
||||
public class Point
|
||||
{
|
||||
public Point()
|
||||
{
|
||||
|
||||
}
|
||||
public Point(double x, double y, double z)
|
||||
{
|
||||
this.X = x;
|
||||
this.Y = y;
|
||||
this.Z = z;
|
||||
}
|
||||
|
||||
public double X { get; set; }
|
||||
|
||||
public double Y { get; set; }
|
||||
|
||||
public double Z { get; set; }
|
||||
}
|
||||
[Serializable]
|
||||
public class Axis
|
||||
{
|
||||
public Axis()
|
||||
{
|
||||
this.Start = new Point();
|
||||
this.End = new Point();
|
||||
this.Flip = 0;
|
||||
}
|
||||
public Axis(Point start, Point end)
|
||||
{
|
||||
this.Start = start;
|
||||
this.End = end;
|
||||
this.Flip = 0;
|
||||
}
|
||||
|
||||
public Point Start { get; set; }
|
||||
|
||||
public Point End { get; set; }
|
||||
|
||||
public AxisFlag AxisFlag { get; set; }
|
||||
/// <summary>
|
||||
/// 1.反向,0.正常
|
||||
/// </summary>
|
||||
public int Flip { get; set; }
|
||||
|
||||
public PositionFixedAngle Loaction { get; set; }
|
||||
public PositionQuaternion LoactionQuaternion { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user