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 PositionConstraintMsg : IMessage
{
public const string k_MessageTypeName = "moveit_msgs/PositionConstraint";
public string MessageTypeName => k_MessageTypeName;
public static readonly MessageTypeId k_MessageTypeId = new MessageTypeId(k_MessageTypeName);
public MessageTypeId MessageTypeId => k_MessageTypeId;
// This message contains the definition of a position constraint.
public StdMessages.HeaderMsg header;
// The robot link this constraint refers to
public string link_name;
// The offset (in the link frame) for the target point on the link we are planning for
public GeometryMessages.Vector3Msg target_point_offset;
// The volume this constraint refers to
public BoundingVolumeMsg constraint_region;
// A weighting factor for this constraint (denotes relative importance to other constraints. Closer to zero means less important)
public double weight;
public PositionConstraintMsg()
{
this.header = new StdMessages.HeaderMsg();
this.link_name = "";
this.target_point_offset = new GeometryMessages.Vector3Msg();
this.constraint_region = new BoundingVolumeMsg();
this.weight = 0.0;
}
public PositionConstraintMsg(StdMessages.HeaderMsg header, string link_name, GeometryMessages.Vector3Msg target_point_offset, BoundingVolumeMsg constraint_region, double weight)
{
this.header = header;
this.link_name = link_name;
this.target_point_offset = target_point_offset;
this.constraint_region = constraint_region;
this.weight = weight;
}
static string[] s_FieldNames = { "header", "link_name", "target_point_offset",
"constraint_region", "weight" };
public static PositionConstraintMsg Deserialize(IMessageDeserializer deserializer) => new PositionConstraintMsg(deserializer);
private PositionConstraintMsg(IMessageDeserializer deserializer)
{
deserializer.BeginMessage(s_FieldNames);
deserializer.Read(out this.header);
deserializer.Read(out this.link_name);
deserializer.Read(out this.target_point_offset);
deserializer.Read(out this.constraint_region);
deserializer.Read(out this.weight);
deserializer.EndMessage();
}
public void WriteTo(IMessageSerializer serializer)
{
serializer.BeginMessage(s_FieldNames);
serializer.Write(this.header);
serializer.Write(this.link_name);
serializer.Write(this.target_point_offset);
serializer.Write(this.constraint_region);
serializer.Write(this.weight);
serializer.EndMessage();
}
public override string ToString()
{
return "PositionConstraintMsg: " +
"\nheader: " + header.ToString() +
"\nlink_name: " + link_name.ToString() +
"\ntarget_point_offset: " + target_point_offset.ToString() +
"\nconstraint_region: " + constraint_region.ToString() +
"\nweight: " + weight.ToString();
}
#if UNITY_EDITOR
[UnityEditor.InitializeOnLoadMethod]
#else
[UnityEngine.RuntimeInitializeOnLoadMethod(UnityEngine.RuntimeInitializeLoadType.BeforeSceneLoad)]
#endif
public static void Register()
{
MessageTypeRegistry.Register(k_MessageTypeId, Deserialize);
}
}
}