public void SendPos(int id) { if (id != 0 && id <= props.Length) { Vector3 posTmp = props[id - 1].transform.position; Quaternion rotTmp = props[id - 1].transform.rotation; pt = new PointMsg(posTmp.x, posTmp.y, posTmp.z); qt = new QuaternionMsg(rotTmp.x, rotTmp.y, rotTmp.z, rotTmp.w); posMsg = new PoseMsg(pt, qt); obj.GetComponent <ROSInitializerSAUVC>().rosSAUVC.Publish(PosPublisher.GetMessageTopic(), posMsg); } }
public static string ToYAMLString(PosPublisher msg) { return(msg.ToString()); }