diff --git a/ros/angel_msgs/CMakeLists.txt b/ros/angel_msgs/CMakeLists.txt index 6d1645aa5..692667a4e 100644 --- a/ros/angel_msgs/CMakeLists.txt +++ b/ros/angel_msgs/CMakeLists.txt @@ -28,6 +28,7 @@ set( message_files msg/AruiObject3d.msg msg/AruiUpdate.msg msg/AruiUserNotification.msg + msg/DialogueUtterance.msg msg/EyeGazeData.msg msg/HandJointPose.msg msg/HandJointPosesUpdate.msg diff --git a/ros/angel_msgs/msg/DialogueUtterance.msg b/ros/angel_msgs/msg/DialogueUtterance.msg new file mode 100644 index 000000000..49d3122ee --- /dev/null +++ b/ros/angel_msgs/msg/DialogueUtterance.msg @@ -0,0 +1,24 @@ +# +# Dialogue Utterance with additional information about the environmental state +# and user model. +# + +# The header primarily encapsulates when this message was emitted. +# The time component of this may be utilized as an identifier for this user +# intent and utterance. +std_msgs/Header header + +# Speech-to-text of the user utterance we have interpreted +string utterance_text + +# Below are optional fields + +# Canonical user intent that has been interpreted. "Canonical" in this context +# is to mean that this string may be used as an identifier of this type of +# user intent. Should be in the range [0,1] where 1.0 means absolute confidence. +string intent +float64 intent_confidence_score + +# Emotion classification. Should be in the range [0,1] where 1.0 means absolute confidence. +string emotion +float64 emotion_confidence_score diff --git a/unity/ARUI/Assets/RosMessages/Angel/msg/DialogueUtteranceMsg.cs b/unity/ARUI/Assets/RosMessages/Angel/msg/DialogueUtteranceMsg.cs new file mode 100644 index 000000000..2e1479edd --- /dev/null +++ b/unity/ARUI/Assets/RosMessages/Angel/msg/DialogueUtteranceMsg.cs @@ -0,0 +1,99 @@ +//Do not edit! This file was generated by Unity-ROS MessageGeneration. +using System; +using System.Linq; +using System.Collections.Generic; +using System.Text; +using Unity.Robotics.ROSTCPConnector.MessageGeneration; + +namespace RosMessageTypes.Angel +{ + [Serializable] + public class DialogueUtteranceMsg : Message + { + public const string k_RosMessageName = "angel_msgs/DialogueUtterance"; + public override string RosMessageName => k_RosMessageName; + + // + // Dialogue Utterance with additional information about the environmental state + // and user model. + // + // The header primarily encapsulates when this message was emitted. + // The time component of this may be utilized as an identifier for this user + // intent and utterance. + public Std.HeaderMsg header; + // Speech-to-text of the user utterance we have interpreted + public string utterance_text; + // Below are optional fields + // Canonical user intent that has been interpreted. "Canonical" in this context + // is to mean that this string may be used as an identifier of this type of + // user intent. Should be in the range [0,1] where 1.0 means absolute confidence. + public string intent; + public double intent_confidence_score; + // Emotion classification. Should be in the range [0,1] where 1.0 means absolute confidence. + public string emotion; + public double emotion_confidence_score; + + public DialogueUtteranceMsg() + { + this.header = new Std.HeaderMsg(); + this.utterance_text = ""; + this.intent = ""; + this.intent_confidence_score = 0.0; + this.emotion = ""; + this.emotion_confidence_score = 0.0; + } + + public DialogueUtteranceMsg(Std.HeaderMsg header, string utterance_text, string intent, double intent_confidence_score, string emotion, double emotion_confidence_score) + { + this.header = header; + this.utterance_text = utterance_text; + this.intent = intent; + this.intent_confidence_score = intent_confidence_score; + this.emotion = emotion; + this.emotion_confidence_score = emotion_confidence_score; + } + + public static DialogueUtteranceMsg Deserialize(MessageDeserializer deserializer) => new DialogueUtteranceMsg(deserializer); + + private DialogueUtteranceMsg(MessageDeserializer deserializer) + { + this.header = Std.HeaderMsg.Deserialize(deserializer); + deserializer.Read(out this.utterance_text); + deserializer.Read(out this.intent); + deserializer.Read(out this.intent_confidence_score); + deserializer.Read(out this.emotion); + deserializer.Read(out this.emotion_confidence_score); + } + + public override void SerializeTo(MessageSerializer serializer) + { + serializer.Write(this.header); + serializer.Write(this.utterance_text); + serializer.Write(this.intent); + serializer.Write(this.intent_confidence_score); + serializer.Write(this.emotion); + serializer.Write(this.emotion_confidence_score); + } + + public override string ToString() + { + return "DialogueUtteranceMsg: " + + "\nheader: " + header.ToString() + + "\nutterance_text: " + utterance_text.ToString() + + "\nintent: " + intent.ToString() + + "\nintent_confidence_score: " + intent_confidence_score.ToString() + + "\nemotion: " + emotion.ToString() + + "\nemotion_confidence_score: " + emotion_confidence_score.ToString(); + } + +#if UNITY_EDITOR + [UnityEditor.InitializeOnLoadMethod] +#else + [UnityEngine.RuntimeInitializeOnLoadMethod] +#endif + public static void Register() + { + MessageRegistry.Register(k_RosMessageName, Deserialize); + } + } +} \ No newline at end of file diff --git a/unity/ARUI/Assets/RosMessages/Angel/msg/DialogueUtteranceMsg.cs.meta b/unity/ARUI/Assets/RosMessages/Angel/msg/DialogueUtteranceMsg.cs.meta new file mode 100644 index 000000000..5d154c5ad --- /dev/null +++ b/unity/ARUI/Assets/RosMessages/Angel/msg/DialogueUtteranceMsg.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 244f6af8d6d7e4c18a6e2d52b444d387 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: \ No newline at end of file