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 RobotStateMsg : IMessage
{
public const string k_MessageTypeName = "moveit_msgs/RobotState";
public string MessageTypeName => k_MessageTypeName;
public static readonly MessageTypeId k_MessageTypeId = new MessageTypeId(k_MessageTypeName);
public MessageTypeId MessageTypeId => k_MessageTypeId;
// This message contains information about the robot state, i.e. the positions of its joints and links
public SensorMessages.JointStateMsg joint_state;
// Joints that may have multiple DOF are specified here
public SensorMessages.MultiDOFJointStateMsg multi_dof_joint_state;
// Attached collision objects (attached to some link on the robot)
public AttachedCollisionObjectMsg[] attached_collision_objects;
// Flag indicating whether this scene is to be interpreted as a diff with respect to some other scene
// This is mostly important for handling the attached bodies (whether or not to clear the attached bodies
// of a moveit::core::RobotState before updating it with this message)
public bool is_diff;
public RobotStateMsg()
{
this.joint_state = new SensorMessages.JointStateMsg();
this.multi_dof_joint_state = new SensorMessages.MultiDOFJointStateMsg();
this.attached_collision_objects = new AttachedCollisionObjectMsg[0];
this.is_diff = false;
}
public RobotStateMsg(SensorMessages.JointStateMsg joint_state, SensorMessages.MultiDOFJointStateMsg multi_dof_joint_state, AttachedCollisionObjectMsg[] attached_collision_objects, bool is_diff)
{
this.joint_state = joint_state;
this.multi_dof_joint_state = multi_dof_joint_state;
this.attached_collision_objects = attached_collision_objects;
this.is_diff = is_diff;
}
static string[] s_FieldNames = { "joint_state", "multi_dof_joint_state",
"attached_collision_objects", "is_diff" };
public static RobotStateMsg Deserialize(IMessageDeserializer deserializer) => new RobotStateMsg(deserializer);
private RobotStateMsg(IMessageDeserializer deserializer)
{
deserializer.BeginMessage(s_FieldNames);
deserializer.Read(out this.joint_state);
deserializer.Read(out this.multi_dof_joint_state);
deserializer.Read(out this.attached_collision_objects);
deserializer.Read(out this.is_diff);
deserializer.EndMessage();
}
public void WriteTo(IMessageSerializer serializer)
{
serializer.BeginMessage(s_FieldNames);
serializer.Write(this.joint_state);
serializer.Write(this.multi_dof_joint_state);
serializer.Write(this.attached_collision_objects);
serializer.Write(this.is_diff);
serializer.EndMessage();
}
public override string ToString()
{
return "RobotStateMsg: " +
"\njoint_state: " + joint_state.ToString() +
"\nmulti_dof_joint_state: " + multi_dof_joint_state.ToString() +
"\nattached_collision_objects: " + System.String.Join(", ", attached_collision_objects.ToList()) +
"\nis_diff: " + is_diff.ToString();
}
#if UNITY_EDITOR
[UnityEditor.InitializeOnLoadMethod]
#else
[UnityEngine.RuntimeInitializeOnLoadMethod(UnityEngine.RuntimeInitializeLoadType.BeforeSceneLoad)]
#endif
public static void Register()
{
MessageTypeRegistry.Register(k_MessageTypeId, Deserialize);
}
}
}
68c592872This file is pinned to the selected release. Download the original to open it in your design tool.