Loading files
//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 JointConstraintMsg : IMessage
{
public const string k_MessageTypeName = "moveit_msgs/JointConstraint";
public string MessageTypeName => k_MessageTypeName;
public static readonly MessageTypeId k_MessageTypeId = new MessageTypeId(k_MessageTypeName);
public MessageTypeId MessageTypeId => k_MessageTypeId;
// Constrain the position of a joint to be within a certain bound
public string joint_name;
// the bound to be achieved is [position - tolerance_below, position + tolerance_above]
public double position;
public double tolerance_above;
public double tolerance_below;
// A weighting factor for this constraint (denotes relative importance to other constraints. Closer to zero means less important)
public double weight;
public JointConstraintMsg()
{
this.joint_name = "";
this.position = 0.0;
this.tolerance_above = 0.0;
this.tolerance_below = 0.0;
this.weight = 0.0;
}
public JointConstraintMsg(string joint_name, double position, double tolerance_above, double tolerance_below, double weight)
{
this.joint_name = joint_name;
this.position = position;
this.tolerance_above = tolerance_above;
this.tolerance_below = tolerance_below;
this.weight = weight;
}
static string[] s_FieldNames = { "joint_name", "position", "tolerance_above",
"tolerance_below", "weight" };
public static JointConstraintMsg Deserialize(IMessageDeserializer deserializer) => new JointConstraintMsg(deserializer);
private JointConstraintMsg(IMessageDeserializer deserializer)
{
deserializer.BeginMessage(s_FieldNames);
deserializer.Read(out this.joint_name);
deserializer.Read(out this.position);
deserializer.Read(out this.tolerance_above);
deserializer.Read(out this.tolerance_below);
deserializer.Read(out this.weight);
deserializer.EndMessage();
}
public void WriteTo(IMessageSerializer serializer)
{
serializer.BeginMessage(s_FieldNames);
serializer.Write(this.joint_name);
serializer.Write(this.position);
serializer.Write(this.tolerance_above);
serializer.Write(this.tolerance_below);
serializer.Write(this.weight);
serializer.EndMessage();
}
public override string ToString()
{
return "JointConstraintMsg: " +
"\njoint_name: " + joint_name.ToString() +
"\nposition: " + position.ToString() +
"\ntolerance_above: " + tolerance_above.ToString() +
"\ntolerance_below: " + tolerance_below.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);
}
}
}
b8d1e1d4cThis file is pinned to the selected release. Download the original to open it in your design tool.