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 CollisionObjectMsg : IMessage
{
public const string k_MessageTypeName = "moveit_msgs/CollisionObject";
public string MessageTypeName => k_MessageTypeName;
public static readonly MessageTypeId k_MessageTypeId = new MessageTypeId(k_MessageTypeName);
public MessageTypeId MessageTypeId => k_MessageTypeId;
// a header, used for interpreting the poses
public StdMessages.HeaderMsg header;
// The object's pose relative to the header frame.
// The shapes and subframe poses are defined relative to this pose.
public GeometryMessages.PoseMsg pose;
// The id of the object (name used in MoveIt)
public string id;
// The object type in a database of known objects
public ObjectRecognitionMessages.ObjectTypeMsg type;
// The collision geometries associated with the object.
// Their poses are with respect to the object's pose
// Solid geometric primitives
public ShapeMessages.SolidPrimitiveMsg[] primitives;
public GeometryMessages.PoseMsg[] primitive_poses;
// Meshes
public ShapeMessages.MeshMsg[] meshes;
public GeometryMessages.PoseMsg[] mesh_poses;
// Bounding planes (equation is specified, but the plane can be oriented using an additional pose)
public ShapeMessages.PlaneMsg[] planes;
public GeometryMessages.PoseMsg[] plane_poses;
// Named subframes on the object. Use these to define points of interest on the object that you want
// to plan with (e.g. "tip", "spout", "handle"). The id of the object will be prepended to the subframe.
// If an object with the id "screwdriver" and a subframe "tip" is in the scene, you can use the frame
// "screwdriver/tip" for planning.
// The length of the subframe_names and subframe_poses has to be identical.
public string[] subframe_names;
public GeometryMessages.PoseMsg[] subframe_poses;
// Adds the object to the planning scene. If the object previously existed, it is replaced.
public const sbyte ADD = 0;
// Removes the object from the environment entirely (everything that matches the specified id)
public const sbyte REMOVE = 1;
// Append to an object that already exists in the planning scene. If the object does not exist, it is added.
public const sbyte APPEND = 2;
// If an object already exists in the scene, new poses can be sent (the geometry arrays must be left empty)
// if solely moving the object is desired
public const sbyte MOVE = 3;
// Operation to be performed
public sbyte operation;
public CollisionObjectMsg()
{
this.header = new StdMessages.HeaderMsg();
this.pose = new GeometryMessages.PoseMsg();
this.id = "";
this.type = new ObjectRecognitionMessages.ObjectTypeMsg();
this.primitives = new ShapeMessages.SolidPrimitiveMsg[0];
this.primitive_poses = new GeometryMessages.PoseMsg[0];
this.meshes = new ShapeMessages.MeshMsg[0];
this.mesh_poses = new GeometryMessages.PoseMsg[0];
this.planes = new ShapeMessages.PlaneMsg[0];
this.plane_poses = new GeometryMessages.PoseMsg[0];
this.subframe_names = new string[0];
this.subframe_poses = new GeometryMessages.PoseMsg[0];
this.operation = 0;
}
public CollisionObjectMsg(StdMessages.HeaderMsg header, GeometryMessages.PoseMsg pose, string id, ObjectRecognitionMessages.ObjectTypeMsg type, ShapeMessages.SolidPrimitiveMsg[] primitives, GeometryMessages.PoseMsg[] primitive_poses, ShapeMessages.MeshMsg[] meshes, GeometryMessages.PoseMsg[] mesh_poses, ShapeMessages.PlaneMsg[] planes, GeometryMessages.PoseMsg[] plane_poses, string[] subframe_names, GeometryMessages.PoseMsg[] subframe_poses, sbyte operation)
{
this.header = header;
this.pose = pose;
this.id = id;
this.type = type;
this.primitives = primitives;
this.primitive_poses = primitive_poses;
this.meshes = meshes;
this.mesh_poses = mesh_poses;
this.planes = planes;
this.plane_poses = plane_poses;
this.subframe_names = subframe_names;
this.subframe_poses = subframe_poses;
this.operation = operation;
}
static string[] s_FieldNames = { "header", "pose", "id", "type", "primitives",
"primitive_poses", "meshes", "mesh_poses", "planes", "plane_poses", "subframe_names",
"subframe_poses", "operation" };
public static CollisionObjectMsg Deserialize(IMessageDeserializer deserializer) => new CollisionObjectMsg(deserializer);
private CollisionObjectMsg(IMessageDeserializer deserializer)
{
deserializer.BeginMessage(s_FieldNames);
deserializer.Read(out this.header);
deserializer.Read(out this.pose);
deserializer.Read(out this.id);
deserializer.Read(out this.type);
deserializer.Read(out this.primitives);
deserializer.Read(out this.primitive_poses);
deserializer.Read(out this.meshes);
deserializer.Read(out this.mesh_poses);
deserializer.Read(out this.planes);
deserializer.Read(out this.plane_poses);
deserializer.Read(out this.subframe_names);
deserializer.Read(out this.subframe_poses);
deserializer.Read(out this.operation);
deserializer.EndMessage();
}
public void WriteTo(IMessageSerializer serializer)
{
serializer.BeginMessage(s_FieldNames);
serializer.Write(this.header);
serializer.Write(this.pose);
serializer.Write(this.id);
serializer.Write(this.type);
serializer.Write(this.primitives);
serializer.Write(this.primitive_poses);
serializer.Write(this.meshes);
serializer.Write(this.mesh_poses);
serializer.Write(this.planes);
serializer.Write(this.plane_poses);
serializer.Write(this.subframe_names);
serializer.Write(this.subframe_poses);
serializer.Write(this.operation);
serializer.EndMessage();
}
public override string ToString()
{
return "CollisionObjectMsg: " +
"\nheader: " + header.ToString() +
"\npose: " + pose.ToString() +
"\nid: " + id.ToString() +
"\ntype: " + type.ToString() +
"\nprimitives: " + System.String.Join(", ", primitives.ToList()) +
"\nprimitive_poses: " + System.String.Join(", ", primitive_poses.ToList()) +
"\nmeshes: " + System.String.Join(", ", meshes.ToList()) +
"\nmesh_poses: " + System.String.Join(", ", mesh_poses.ToList()) +
"\nplanes: " + System.String.Join(", ", planes.ToList()) +
"\nplane_poses: " + System.String.Join(", ", plane_poses.ToList()) +
"\nsubframe_names: " + System.String.Join(", ", subframe_names.ToList()) +
"\nsubframe_poses: " + System.String.Join(", ", subframe_poses.ToList()) +
"\noperation: " + operation.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.