Class QuaternionMsg
ROS geometry_msgs/Quaternion message.
Implements
Inherited Members
Namespace: Unity.SimulationPro.Foundation.GeometryMessages
Assembly: Unity.SimulationPro.Foundation.dll
Syntax
[Serializable]
public class QuaternionMsg : IMessage
Constructors
QuaternionMsg()
Initializes a new instance with default values.
Declaration
public QuaternionMsg()
QuaternionMsg(double, double, double, double)
Initializes a new instance with default values.
Declaration
public QuaternionMsg(double x, double y, double z, double w)
Parameters
| Type | Name | Description |
|---|---|---|
| double | x | X-axis component. |
| double | y | Y-axis component. |
| double | z | Z-axis component. |
| double | w | W (scalar) component of the quaternion. |
Fields
k_MessageTypeId
Identifier for this message type.
Declaration
public static readonly MessageTypeId k_MessageTypeId
Field Value
| Type | Description |
|---|---|
| MessageTypeId |
k_MessageTypeName
The ROS message type name string used for serialization and topic matching.
Declaration
public const string k_MessageTypeName = "geometry_msgs/Quaternion"
Field Value
| Type | Description |
|---|---|
| string |
w
W field.
Declaration
public double w
Field Value
| Type | Description |
|---|---|
| double |
x
This represents an orientation in free space in quaternion form.
Declaration
public double x
Field Value
| Type | Description |
|---|---|
| double |
y
Y field.
Declaration
public double y
Field Value
| Type | Description |
|---|---|
| double |
z
Z field.
Declaration
public double z
Field Value
| Type | Description |
|---|---|
| double |
Properties
MessageTypeId
Gets the unique runtime identifier for this message type.
Declaration
public MessageTypeId MessageTypeId { get; }
Property Value
| Type | Description |
|---|---|
| MessageTypeId |
MessageTypeName
Gets the ROS message type name for this message.
Declaration
public string MessageTypeName { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Deserialize(IMessageDeserializer)
Deserializes a QuaternionMsg from the given deserializer.
Declaration
public static QuaternionMsg Deserialize(IMessageDeserializer deserializer)
Parameters
| Type | Name | Description |
|---|---|---|
| IMessageDeserializer | deserializer | The deserializer. |
Returns
| Type | Description |
|---|---|
| QuaternionMsg | A new QuaternionMsg instance. |
Equals(object)
Determines whether the specified object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The target object. |
Returns
| Type | Description |
|---|---|
| bool |
|
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for this instance. |
Overrides
Register()
Registers this message type with the MessageTypeRegistry.
Declaration
[InitializeOnLoadMethod]
public static void Register()
ToString()
Returns a human-readable string representation of this message.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string representation of this instance. |
Overrides
WriteTo(IMessageSerializer)
Serializes this message to the given serializer.
Declaration
public void WriteTo(IMessageSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| IMessageSerializer | serializer | The serializer. |
Operators
operator ==(QuaternionMsg, QuaternionMsg)
Determines whether two QuaternionMsg instances have equal component values.
Declaration
public static bool operator ==(QuaternionMsg a, QuaternionMsg b)
Parameters
| Type | Name | Description |
|---|---|---|
| QuaternionMsg | a | First operand. |
| QuaternionMsg | b | Second operand. |
Returns
| Type | Description |
|---|---|
| bool |
|
operator !=(QuaternionMsg, QuaternionMsg)
Determines whether two instances are not equal.
Declaration
public static bool operator !=(QuaternionMsg a, QuaternionMsg b)
Parameters
| Type | Name | Description |
|---|---|---|
| QuaternionMsg | a | First operand. |
| QuaternionMsg | b | Second operand. |
Returns
| Type | Description |
|---|---|
| bool |
|