Loading files
b8d1e1d4cThis file is pinned to the selected release. Download the original to open it in your design tool.
//Do not edit! This file was generated by com.unity.simulationpro MessageGeneration.
using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using Unity.SimulationPro.Foundation;
namespace Unity.SimulationPro.Foundation.MoveitMessages
{
[Serializable]
public class ContactInformationMsg : IMessage
{
public const string k_MessageTypeName = "moveit_msgs/ContactInformation";
public string MessageTypeName => k_MessageTypeName;
public static readonly MessageTypeId k_MessageTypeId = new MessageTypeId(k_MessageTypeName);
public MessageTypeId MessageTypeId => k_MessageTypeId;
// Standard ROS header contains information
// about the frame in which this
// contact is specified
public StdMessages.HeaderMsg header;
// Position of the contact point
public GeometryMessages.PointMsg position;
// Normal corresponding to the contact point
public GeometryMessages.Vector3Msg normal;
// Depth of contact point
public double depth;
// Name of the first body that is in contact
// This could be a link or a namespace that represents a body
public string contact_body_1;
public uint body_type_1;
// Name of the second body that is in contact
// This could be a link or a namespace that represents a body
public string contact_body_2;
public uint body_type_2;
public const uint ROBOT_LINK = 0;
public const uint WORLD_OBJECT = 1;
public const uint ROBOT_ATTACHED = 2;
public ContactInformationMsg()
{
this.header = new StdMessages.HeaderMsg();
this.position = new GeometryMessages.PointMsg();
this.normal = new GeometryMessages.Vector3Msg();
this.depth = 0.0;
this.contact_body_1 = "";
this.body_type_1 = 0;
this.contact_body_2 = "";
this.body_type_2 = 0;
}
public ContactInformationMsg(StdMessages.HeaderMsg header, GeometryMessages.PointMsg position, GeometryMessages.Vector3Msg normal, double depth, string contact_body_1, uint body_type_1, string contact_body_2, uint body_type_2)
{
this.header = header;
this.position = position;
this.normal = normal;
this.depth = depth;
this.contact_body_1 = contact_body_1;
this.body_type_1 = body_type_1;
this.contact_body_2 = contact_body_2;
this.body_type_2 = body_type_2;
}
static string[] s_FieldNames = { "header", "position", "normal", "depth", "contact_body_1",
"body_type_1", "contact_body_2", "body_type_2" };
public static ContactInformationMsg Deserialize(IMessageDeserializer deserializer) => new ContactInformationMsg(deserializer);
private ContactInformationMsg(IMessageDeserializer deserializer)
{
deserializer.BeginMessage(s_FieldNames);
deserializer.Read(out this.header);
deserializer.Read(out this.position);
deserializer.Read(out this.normal);
deserializer.Read(out this.depth);
deserializer.Read(out this.contact_body_1);
deserializer.Read(out this.body_type_1);
deserializer.Read(out this.contact_body_2);
deserializer.Read(out this.body_type_2);
deserializer.EndMessage();
}
public void WriteTo(IMessageSerializer serializer)
{
serializer.BeginMessage(s_FieldNames);
serializer.Write(this.header);
serializer.Write(this.position);
serializer.Write(this.normal);
serializer.Write(this.depth);
serializer.Write(this.contact_body_1);
serializer.Write(this.body_type_1);
serializer.Write(this.contact_body_2);
serializer.Write(this.body_type_2);
serializer.EndMessage();
}
public override string ToString()
{
return "ContactInformationMsg: " +
"\nheader: " + header.ToString() +
"\nposition: " + position.ToString() +
"\nnormal: " + normal.ToString() +
"\ndepth: " + depth.ToString() +
"\ncontact_body_1: " + contact_body_1.ToString() +
"\nbody_type_1: " + body_type_1.ToString() +
"\ncontact_body_2: " + contact_body_2.ToString() +
"\nbody_type_2: " + body_type_2.ToString();
}
#if UNITY_EDITOR
[UnityEditor.InitializeOnLoadMethod]
#else
[UnityEngine.RuntimeInitializeOnLoadMethod(UnityEngine.RuntimeInitializeLoadType.BeforeSceneLoad)]
#endif
public static void Register()
{
MessageTypeRegistry.Register(k_MessageTypeId, Deserialize);
}
}
}