示例#1
0
 public new static string GetMessageType()
 {
     return(PoseMsg.GetMessageType());
 }
示例#2
0
 /// <summary>
 /// Adjusts the position of the tortoise according to the pose from the turtlesim node.
 /// </summary>
 /// <param name="msg"></param>
 public void ReceivePoseMessage(PoseMsg msg)
 {
     Tortoise.transform.position = new Vector3(msg.GetX() - m_PositionOffset, msg.GetY() - m_PositionOffset, Tortoise.transform.position.z);
     // the orientation comes in radians and with a 90 degree offset
     Tortoise.transform.eulerAngles = new Vector3(0f, 0f, msg.GetTheta() * Mathf.Rad2Deg - 90f);
 }