Ejemplo n.º 1
0
        /// <summary>
        /// Converts to <see cref="PoseStruct" />.
        /// </summary>
        /// <returns>
        /// The Robot <see cref="PoseStruct" /> for this instance
        /// </returns>
        internal PoseStruct ToPoseStruct()
        {
            var result = new PoseStruct
            {
                X        = Position.X,
                Y        = Position.Y,
                Z        = Position.Z,
                Q0       = Rotation.Q0,
                Q1       = Rotation.Q1,
                Q2       = Rotation.Q2,
                Q3       = Rotation.Q3,
                OriginId = OriginId.Value
            };

            return(result);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Pose"/> class.
 /// </summary>
 /// <param name="poseStruct">The pose structure.</param>
 internal Pose(PoseStruct poseStruct)
 {
     Position = new Position(poseStruct.X, poseStruct.Y, poseStruct.Z);
     Rotation = new Quaternion(poseStruct.Q0, poseStruct.Q1, poseStruct.Q2, poseStruct.Q3);
     OriginId = poseStruct.OriginId;
 }