-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #412 from derkmed/dialog_utterance
Add modular DialogueUtterance msg for upcoming Node Refactoring.
- Loading branch information
Showing
4 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
99 changes: 99 additions & 0 deletions
99
unity/ARUI/Assets/RosMessages/Angel/msg/DialogueUtteranceMsg.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
unity/ARUI/Assets/RosMessages/Angel/msg/DialogueUtteranceMsg.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.