Skip to content

Commit 7866baa

Browse files
committed
Add new modular DialogueUtterance msg that allows node reordering
1 parent 6b2088e commit 7866baa

File tree

4 files changed

+135
-0
lines changed

4 files changed

+135
-0
lines changed

ros/angel_msgs/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ set( message_files
2828
msg/AruiObject3d.msg
2929
msg/AruiUpdate.msg
3030
msg/AruiUserNotification.msg
31+
msg/DialogueUtterance.msg
3132
msg/EyeGazeData.msg
3233
msg/HandJointPose.msg
3334
msg/HandJointPosesUpdate.msg
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Dialogue Utterance with additional information about the environmental state
3+
# and user model.
4+
#
5+
6+
# The header primarily encapsulates when this message was emitted.
7+
# The time component of this may be utilized as an identifier for this user
8+
# intent and utterance.
9+
std_msgs/Header header
10+
11+
# Speech-to-text of the user utterance we have interpreted
12+
string utterance_text
13+
14+
# Below are optional fields
15+
16+
# Canonical user intent that has been interpreted. "Canonical" in this context
17+
# is to mean that this string may be used as an identifier of this type of
18+
# user intent. Should be in the range [0,1] where 1.0 means absolute confidence.
19+
string intent
20+
float64 intent_confidence_score
21+
22+
# Emotion classification. Should be in the range [0,1] where 1.0 means absolute confidence.
23+
string emotion
24+
float64 emotion_confidence_score
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
//Do not edit! This file was generated by Unity-ROS MessageGeneration.
2+
using System;
3+
using System.Linq;
4+
using System.Collections.Generic;
5+
using System.Text;
6+
using Unity.Robotics.ROSTCPConnector.MessageGeneration;
7+
8+
namespace RosMessageTypes.Angel
9+
{
10+
[Serializable]
11+
public class DialogueUtteranceMsg : Message
12+
{
13+
public const string k_RosMessageName = "angel_msgs/DialogueUtterance";
14+
public override string RosMessageName => k_RosMessageName;
15+
16+
//
17+
// Dialogue Utterance with additional information about the environmental state
18+
// and user model.
19+
//
20+
// The header primarily encapsulates when this message was emitted.
21+
// The time component of this may be utilized as an identifier for this user
22+
// intent and utterance.
23+
public Std.HeaderMsg header;
24+
// Speech-to-text of the user utterance we have interpreted
25+
public string utterance_text;
26+
// Below are optional fields
27+
// Canonical user intent that has been interpreted. "Canonical" in this context
28+
// is to mean that this string may be used as an identifier of this type of
29+
// user intent. Should be in the range [0,1] where 1.0 means absolute confidence.
30+
public string intent;
31+
public double intent_confidence_score;
32+
// Emotion classification. Should be in the range [0,1] where 1.0 means absolute confidence.
33+
public string emotion;
34+
public double emotion_confidence_score;
35+
36+
public DialogueUtteranceMsg()
37+
{
38+
this.header = new Std.HeaderMsg();
39+
this.utterance_text = "";
40+
this.intent = "";
41+
this.intent_confidence_score = 0.0;
42+
this.emotion = "";
43+
this.emotion_confidence_score = 0.0;
44+
}
45+
46+
public DialogueUtteranceMsg(Std.HeaderMsg header, string utterance_text, string intent, double intent_confidence_score, string emotion, double emotion_confidence_score)
47+
{
48+
this.header = header;
49+
this.utterance_text = utterance_text;
50+
this.intent = intent;
51+
this.intent_confidence_score = intent_confidence_score;
52+
this.emotion = emotion;
53+
this.emotion_confidence_score = emotion_confidence_score;
54+
}
55+
56+
public static DialogueUtteranceMsg Deserialize(MessageDeserializer deserializer) => new DialogueUtteranceMsg(deserializer);
57+
58+
private DialogueUtteranceMsg(MessageDeserializer deserializer)
59+
{
60+
this.header = Std.HeaderMsg.Deserialize(deserializer);
61+
deserializer.Read(out this.utterance_text);
62+
deserializer.Read(out this.intent);
63+
deserializer.Read(out this.intent_confidence_score);
64+
deserializer.Read(out this.emotion);
65+
deserializer.Read(out this.emotion_confidence_score);
66+
}
67+
68+
public override void SerializeTo(MessageSerializer serializer)
69+
{
70+
serializer.Write(this.header);
71+
serializer.Write(this.utterance_text);
72+
serializer.Write(this.intent);
73+
serializer.Write(this.intent_confidence_score);
74+
serializer.Write(this.emotion);
75+
serializer.Write(this.emotion_confidence_score);
76+
}
77+
78+
public override string ToString()
79+
{
80+
return "DialogueUtteranceMsg: " +
81+
"\nheader: " + header.ToString() +
82+
"\nutterance_text: " + utterance_text.ToString() +
83+
"\nintent: " + intent.ToString() +
84+
"\nintent_confidence_score: " + intent_confidence_score.ToString() +
85+
"\nemotion: " + emotion.ToString() +
86+
"\nemotion_confidence_score: " + emotion_confidence_score.ToString();
87+
}
88+
89+
#if UNITY_EDITOR
90+
[UnityEditor.InitializeOnLoadMethod]
91+
#else
92+
[UnityEngine.RuntimeInitializeOnLoadMethod]
93+
#endif
94+
public static void Register()
95+
{
96+
MessageRegistry.Register(k_RosMessageName, Deserialize);
97+
}
98+
}
99+
}

unity/ARUI/Assets/RosMessages/Angel/msg/DialogueUtteranceMsg.cs.meta

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)