//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 PositionIKRequestMsg : IMessage { public const string k_MessageTypeName = "moveit_msgs/PositionIKRequest"; public string MessageTypeName => k_MessageTypeName; public static readonly MessageTypeId k_MessageTypeId = new MessageTypeId(k_MessageTypeName); public MessageTypeId MessageTypeId => k_MessageTypeId; // A Position IK request message // The name of the group which will be used to compute IK // e.g. "right_arm", or "arms" - see IK specification for multiple-groups below // Information from the SRDF will be used to automatically determine which link // to solve IK for, unless ik_link_name is also specified public string group_name; // A RobotState consisting of hint/seed positions for the IK computation and positions // for all the other joints in the robot. Additional state information provided here is // used to specify starting positions for other joints/links on the robot. // This state MUST contain state for all joints to be used by the IK solver // to compute IK. The list of joints that the IK solver deals with can be // found using the SRDF for the corresponding group public RobotStateMsg robot_state; // A set of constraints that the IK must obey; by default, this set of constraints is empty public ConstraintsMsg constraints; // Find an IK solution that avoids collisions. By default, this is false public bool avoid_collisions; // (OPTIONAL) The name of the link for which we are computing IK // If not specified, the link name will be inferred from a combination // of the group name and the SRDF. If any values are specified for ik_link_names, // this value is ignored public string ik_link_name; // The stamped pose of the link, when the IK solver computes the joint values // for all the joints in a group. This value is ignored if pose_stamped_vector // has any elements specified. public GeometryMessages.PoseStampedMsg pose_stamped; // Multi-group parameters // (OPTIONAL) The names of the links for which we are computing IK // If not specified, the link name will be inferred from a combination // of the group name and the SRDF public string[] ik_link_names; // (OPTIONAL) The (stamped) poses of the links we are computing IK for (when a group has more than one end effector) // e.g. The "arms" group might consist of both the "right_arm" and the "left_arm" // The order of the groups referred to is the same as the order setup in the SRDF public GeometryMessages.PoseStampedMsg[] pose_stamped_vector; // Maximum allowed time for IK calculation public BuiltinInterfacesMessages.DurationMsg timeout; public PositionIKRequestMsg() { this.group_name = ""; this.robot_state = new RobotStateMsg(); this.constraints = new ConstraintsMsg(); this.avoid_collisions = false; this.ik_link_name = ""; this.pose_stamped = new GeometryMessages.PoseStampedMsg(); this.ik_link_names = new string[0]; this.pose_stamped_vector = new GeometryMessages.PoseStampedMsg[0]; this.timeout = new BuiltinInterfacesMessages.DurationMsg(); } public PositionIKRequestMsg(string group_name, RobotStateMsg robot_state, ConstraintsMsg constraints, bool avoid_collisions, string ik_link_name, GeometryMessages.PoseStampedMsg pose_stamped, string[] ik_link_names, GeometryMessages.PoseStampedMsg[] pose_stamped_vector, BuiltinInterfacesMessages.DurationMsg timeout) { this.group_name = group_name; this.robot_state = robot_state; this.constraints = constraints; this.avoid_collisions = avoid_collisions; this.ik_link_name = ik_link_name; this.pose_stamped = pose_stamped; this.ik_link_names = ik_link_names; this.pose_stamped_vector = pose_stamped_vector; this.timeout = timeout; } static string[] s_FieldNames = { "group_name", "robot_state", "constraints", "avoid_collisions", "ik_link_name", "pose_stamped", "ik_link_names", "pose_stamped_vector", "timeout" }; public static PositionIKRequestMsg Deserialize(IMessageDeserializer deserializer) => new PositionIKRequestMsg(deserializer); private PositionIKRequestMsg(IMessageDeserializer deserializer) { deserializer.BeginMessage(s_FieldNames); deserializer.Read(out this.group_name); deserializer.Read(out this.robot_state); deserializer.Read(out this.constraints); deserializer.Read(out this.avoid_collisions); deserializer.Read(out this.ik_link_name); deserializer.Read(out this.pose_stamped); deserializer.Read(out this.ik_link_names); deserializer.Read(out this.pose_stamped_vector); deserializer.Read(out this.timeout); deserializer.EndMessage(); } public void WriteTo(IMessageSerializer serializer) { serializer.BeginMessage(s_FieldNames); serializer.Write(this.group_name); serializer.Write(this.robot_state); serializer.Write(this.constraints); serializer.Write(this.avoid_collisions); serializer.Write(this.ik_link_name); serializer.Write(this.pose_stamped); serializer.Write(this.ik_link_names); serializer.Write(this.pose_stamped_vector); serializer.Write(this.timeout); serializer.EndMessage(); } public override string ToString() { return "PositionIKRequestMsg: " + "\ngroup_name: " + group_name.ToString() + "\nrobot_state: " + robot_state.ToString() + "\nconstraints: " + constraints.ToString() + "\navoid_collisions: " + avoid_collisions.ToString() + "\nik_link_name: " + ik_link_name.ToString() + "\npose_stamped: " + pose_stamped.ToString() + "\nik_link_names: " + System.String.Join(", ", ik_link_names.ToList()) + "\npose_stamped_vector: " + System.String.Join(", ", pose_stamped_vector.ToList()) + "\ntimeout: " + timeout.ToString(); } #if UNITY_EDITOR [UnityEditor.InitializeOnLoadMethod] #else [UnityEngine.RuntimeInitializeOnLoadMethod(UnityEngine.RuntimeInitializeLoadType.BeforeSceneLoad)] #endif public static void Register() { MessageTypeRegistry.Register(k_MessageTypeId, Deserialize); } } }