first commit -push

This commit is contained in:
dungtt
2025-10-15 15:15:53 +07:00
parent 674ae395be
commit a9577c5756
885 changed files with 74595 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Connection;
#nullable disable
public enum ConnectionState
{
ONLINE,
OFFLINE,
CONNECTIONBROKEN
}
public class ConnectionMsg
{
[Required]
public uint HeaderId { get; set; }
[Required]
public string Timestamp { get; set; } = "";
[Required]
public string Version { get; set; } = "";
[Required]
public string Manufacturer { get; set; } = "";
[Required]
public string SerialNumber { get; set; } = "";
[Required]
public string ConnectionState { get; set; } = "";
}

View File

@@ -0,0 +1,25 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public enum ValueDataType
{
BOOL,
NUMBER,
INTEGER,
FLOAT,
STRING,
OBJECT,
ARRAY,
}
public class ActionParameters
{
[Required]
public string Key { get; set; }
[Required]
public string ValueDataType { get; set; }
public string Description { get; set; }
public bool IsOptional { get; set; }
}

View File

@@ -0,0 +1,23 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public enum ActionScopes
{
INSTANT,
NODE,
EDGE,
}
public class AgvActions
{
[Required]
public string ActionType { get; set; }
public string ActionDescription { get; set; }
[Required]
public string[] ActionScopes { get; set; }
public ActionParameters[] ActionParameters { get; set; }
public string ResultDescription { get; set; }
public string[] BlockingTypes { get; set; }
}

View File

@@ -0,0 +1,12 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public class AgvGeometry
{
public WheelDefinitions[] WheelDefinitions { get; set; }
public Envelopes2d[] Envelopes2d { get; set; }
public Envelopes3d[] Envelopes3d { get; set; }
}

View File

@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
public class BoundingBoxReference
{
[Required]
public double X { get; set; }
[Required]
public double Y { get; set; }
[Required]
public double Z { get; set; }
public double Theta { get; set; }
}

View File

@@ -0,0 +1,21 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public class PolygonPoints
{
[Required]
public double X { get; set; }
[Required]
public double Y { get; set; }
}
public class Envelopes2d
{
[Required]
public string Set { get; set; }
[Required]
public PolygonPoints[] PolygonPoints { get; set; }
public string Description { get; set; }
}

View File

@@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public class Envelopes3d
{
[Required]
public string Set { get; set; }
[Required]
public string Format { get; set; }
public object Data { get; set; }
public string Url { get; set; }
public string Description { get; set; }
}

View File

@@ -0,0 +1,30 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public class FactSheetMsg
{
public uint HeaderId { get; set; }
public string Timestamp { get; set; }
[Required]
public string Version { get; set; }
[Required]
public string Manufacturer { get; set; }
[Required]
public string SerialNumber { get; set; }
[Required]
public TypeSpecification TypeSpecification { get; set; }
[Required]
public PhysicalParameters PhysicalParameters { get; set; }
[Required]
public ProtocolLimits ProtocolLimits { get; set; }
[Required]
public ProtocolFeatures ProtocolFeatures { get; set; }
[Required]
public AgvGeometry AgvGeometry { get; set; }
[Required]
public LoadSpecification LoadSpecification { get; set; }
//public LocalizationParameter LocalizationParameters { get; set; }
}

View File

@@ -0,0 +1,13 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
public class LoadDimensions
{
[Required]
public double Length { get; set; }
[Required]
public double Width { get; set; }
public double Height { get; set; }
}

View File

@@ -0,0 +1,26 @@
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public class LoadSets
{
public string SetName { get; set; }
public string LoadType { get; set; }
public string[] LoadPositions { get; set; }
public BoundingBoxReference BoundingBoxReference { get; set; }
public LoadDimensions LoadDimensions { get; set; }
public double MaxWeigth { get; set; }
public double MinLoadhandlingHeight { get; set; }
public double MaxLoadhandlingHeight { get; set; }
public double MinLoadhandlingDepth { get; set; }
public double MaxLoadhandlingDepth { get; set; }
public double MinLoadhandlingTilt { get; set; }
public double MaxLoadhandlingTilt { get; set; }
public double AgvSpeedLimit { get; set; }
public double AgvAccelerationLimit { get; set; }
public double AgvDecelerationLimit { get; set; }
public double PickTime { get; set; }
public double DropTime { get; set; }
public string Description { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public class LoadSpecification
{
public string[] LoadPositions { get; set; }
public LoadSets[] LoadSets { get; set; }
}

View File

@@ -0,0 +1,6 @@
namespace RobotNet.RobotShares.VDA5050.Factsheet;
public class LocalizationParameter
{
public double LocalizationParameters { get; set; }
}

View File

@@ -0,0 +1,21 @@
namespace RobotNet.RobotShares.VDA5050.Factsheet;
public class MaxArrayLens
{
public int OrderNodes { get; set; }
public int OrderEdges { get; set; }
public int NodeActions { get; set; }
public int EdgeActions { get; set; }
public int ActionsActionsParameters { get; set; }
public int InstantActions { get; set; }
public int TrajectoryKnotVector { get; set; }
public int TrajectoryControlPoints { get; set; }
public int StateNodeStates { get; set; }
public int StateEdgeStates { get; set; }
public int StateLoads { get; set; }
public int StateActionStates { get; set; }
public int StateErrors { get; set; }
public int StateInformation { get; set; }
public int ErrorErrorReferences { get; set; }
public int InformationInfoReferences { get; set; }
}

View File

@@ -0,0 +1,12 @@
namespace RobotNet.RobotShares.VDA5050.Factsheet;
public class MaxStringLens
{
public int MsgLen { get; set; }
public int TopicSerialLen { get; set; }
public int TopicElemLen { get; set; }
public int IdLen { get; set; }
public bool IdNumericalOnly { get; set; }
public int EnumLen { get; set; }
public int LoadIdLen { get; set; }
}

View File

@@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public enum Support
{
SUPPORTED,
REQUIRED,
}
public class OptionalParameters
{
[Required]
public string Parameter { get; set; }
[Required]
public string Support { get; set; }
public string Description { get; set; }
}

View File

@@ -0,0 +1,22 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
public class PhysicalParameters
{
[Required]
public double SpeedMin { get; set; }
[Required]
public double SpeedMax { get; set; }
[Required]
public double AccelerationMax { get; set; }
[Required]
public double DecelerationMax { get; set; }
public double HeightMin { get; set; }
[Required]
public double HeightMax { get; set; }
[Required]
public double Width { get; set; }
[Required]
public double Length { get; set; }
}

View File

@@ -0,0 +1,13 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public class ProtocolFeatures
{
[Required]
public OptionalParameters[] OptionalParameters { get; set; }
[Required]
public AgvActions[] AgvActions { get; set; }
}

View File

@@ -0,0 +1,14 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public class ProtocolLimits
{
[Required]
public MaxStringLens MaxStringLens { get; set; }
[Required]
public MaxArrayLens MaxArrayLens { get; set; }
[Required]
public Timing Timing { get; set; }
}

View File

@@ -0,0 +1,13 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
public class Timing
{
[Required]
public double MinOrderInterval { get; set; }
[Required]
public double MinStateInterval { get; set; }
public double DefaultStateInterval { get; set; }
public double VisualizationInterval { get; set; }
}

View File

@@ -0,0 +1,50 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public enum AgvKinematic
{
DIFF,
OMNI,
THREEWHEEL
}
public enum AgvClass
{
FORKLIFT,
CONVEYOR,
TUGGER,
CARRIER
}
public enum LocalizationTypes
{
NATURAL,
REFLECTOR,
RFID,
DMC,
SPOT,
GRID,
}
public enum NavigationTypes
{
PHYSICAL_LINDE_GUIDED,
VIRTUAL_LINE_GUIDED,
AUTONOMOUS,
}
public class TypeSpecification
{
[Required]
public string SeriesName { get; set; }
public string SeriesDescription { get; set; }
[Required]
public string AgvKinematic { get; set; }
[Required]
public string AgvClass { get; set; }
[Required]
public double MaxLoadMass { get; set; }
[Required]
public string[] LocalizationTypes { get; set; } = [];
[Required]
public string[] NavigationTypes { get; set; } = [];
}

View File

@@ -0,0 +1,39 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Factsheet;
#nullable disable
public enum WheelDefinitionsType
{
DRIVE,
CASTER,
FIXED,
MECANUM,
}
public class WheelDefinitionsPosition
{
[Required]
public double X { get; set; }
[Required]
public double Y { get; set; }
public double Theta { get; set; }
}
public class WheelDefinitions
{
[Required]
public string Type { get; set; }
[Required]
public bool IsActiveDriven { get; set; }
[Required]
public bool IsActiveSteered { get; set; }
[Required]
public WheelDefinitionsPosition Position { get; set; }
[Required]
public double Diameter { get; set; }
[Required]
public double Width { get; set; }
public double CenterDisplacement { get; set; }
public string Constraints { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class Battery
{
public uint Battery_low { get; set; }
public uint Battery_normal { get; set; }
public uint Battery_good { get; set; }
public uint Battery_full { get; set; }
}

View File

@@ -0,0 +1,11 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public enum BatteryThreshold
{
LOW,
NORMAL,
MIDDLE,
GOOD,
FULL,
NONE
}

View File

@@ -0,0 +1,31 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class CameraSafety
{
public double Pass_through_x_min { get; set; }
public double Pass_through_x_max { get; set; }
public double Pass_through_y_min { get; set; }
public double Pass_through_y_max { get; set; }
public double Pass_through_z_min { get; set; }
public double Pass_through_z_max { get; set; }
public uint Ground_seg_max_iterations { get; set; }
public double Ground_seg_distance_threshold { get; set; }
public double Warn_z1 { get; set; }
public double Protect_z1 { get; set; }
public double Warn_z2 { get; set; }
public double Protect_z2 { get; set; }
public double Warn_z3 { get; set; }
public double Protect_z3 { get; set; }
public double Warn_z4 { get; set; }
public double Protect_z4 { get; set; }
public double Warn_z5 { get; set; }
public double Protect_z5 { get; set; }
public double Warn_z6 { get; set; }
public double Protect_z6 { get; set; }
public uint Min_cluster_warn_size { get; set; }
public uint Min_cluster_protect_size { get; set; }
public uint Min_cluster_detect_size { get; set; }
public uint Min_consecutive_warn_count { get; set; }
public uint Min_consecutive_protect_count { get; set; }
public uint Min_consecutive_detect_count { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
#nullable disable
public class ChargerParam
{
public string Charger_ip { get; set; }
public uint Charger_port { get; set; }
}

View File

@@ -0,0 +1,19 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
#nullable disable
public class FactsheetExtendMsg
{
public uint HeaderId { get; set; }
public DateTime Timestamp { get; set; }
public string Version { get; set; }
public string Manufacturer { get; set; }
public string SerialNumber { get; set; }
public ServerParam Server_param { get; set; }
public RobotParam Robot_param { get; set; }
public Localization Localization { get; set; }
public Navigation Navigation { get; set; }
public Safety Safety { get; set; }
public ChargerParam Charger_param { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class ForkSafety
{
public double Muted_field_size { get; set; }
public double Protected_field_size { get; set; }
public double Warning_field_size { get; set; }
public double Detect_field_size { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class Initpose
{
public bool Use_manual_initpose { get; set; }
public double Initpose_x { get; set; }
public double Initpose_y { get; set; }
public double Initpose_yaw { get; set; }
}

View File

@@ -0,0 +1,10 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class LineSegment
{
public double Least_thresh { get; set; }
public double Min_line_length { get; set; }
public double Predict_distance { get; set; }
public uint Seed_line_points { get; set; }
public uint Min_line_points { get; set; }
}

View File

@@ -0,0 +1,14 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
#nullable disable
public class Localization
{
public uint Threshold_quality_loc { get; set; }
public bool Use_localization_marker { get; set; }
public bool Use_pallet_detection { get; set; }
public Initpose Initpose { get; set; }
public Xloc Xloc { get; set; }
public VlMarker Vl_marker { get; set; }
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class Motor
{
public double OdomEncSteeringAngleOffset { get; set; }
public double Steering_fix_wheel_distance_x { get; set; }
public double Steering_fix_wheel_distance_y { get; set; }
public double WheelAcceleration { get; set; }
}

View File

@@ -0,0 +1,11 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
#nullable disable
public class Navigation
{
public bool Using_control_safety { get; set; }
public uint Control_rate { get; set; }
public Rotate Rotate { get; set; }
public PTA Pta { get; set; }
public PPA Ppa { get; set; }
}

View File

@@ -0,0 +1,7 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class PPA
{
public double Ppa_accuracy_goal { get; set; }
public double Ppa_distance_reduce { get; set; }
}

View File

@@ -0,0 +1,15 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class PTA
{
public double Pta_linear_vel_max { get; set; }
public double Pta_linear_vel_min { get; set; }
public double Pta_accuracy_goal { get; set; }
public double Pta_distance_reduce { get; set; }
public double Pta_acceleration { get; set; }
public double Pta_lm_front { get; set; }
public double Pta_lm_back { get; set; }
public double Pta_phi_max { get; set; }
public double Pta_amplitude_max { get; set; }
public uint Pta_w_option { get; set; }
}

View File

@@ -0,0 +1,12 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class RobotParam
{
public bool Use_dynamic_parameter { get; set; } // (Default: True) Declare whether to use dynamic parameters or not
public string? Ethernet_name { get; set; } // The name of Ethernet port which connects to wifi client (e.g eno1, lo, enp3s0)
public double Speed_max_backward { get; set; } // (Default: True) Declare whether to use dynamic parameters or not
public uint Num_day_logger { get; set; } // The name of Ethernet port which connects to wifi client (e.g eno1, lo, enp3s0)
public Motor Motor { get; set; } = new();
public Battery Battery { get; set; } = new();
}

View File

@@ -0,0 +1,9 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class Rotate
{
public double Angular_vel_max { get; set; }
public double Angular_vel_min { get; set; }
public double Acceleration_rotate { get; set; }
public double Tolerances_rotate { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class Safety
{
public bool Use_camera_safety { get; set; }
public CameraSafety Camera_safety { get; set; } = new();
public ForkSafety Fork_safety { get; set; } = new();
}

View File

@@ -0,0 +1,14 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
#nullable disable
public class ServerParam
{
public string Server_ip { get; set; }
public string Server_port { get; set; }
public string Keepalive { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public string Client_protocol { get; set; }
public string Client_id { get; set; }
}

View File

@@ -0,0 +1,21 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class VlMarker
{
public bool Use_odometry { get; set; }
public uint V_angle { get; set; }
public double Length_v { get; set; }
public double Length_l { get; set; }
public double X_laser { get; set; }
public double Y_laser { get; set; }
public bool Flip_laser { get; set; }
public double Rotate_laser { get; set; }
public uint Frequence_control { get; set; }
public double Angle_min { get; set; }
public double Angle_max { get; set; }
public double Max_init_x { get; set; }
public double Max_init_y { get; set; }
public double Max_init_yaw { get; set; }
public LineSegment Line_segment { get; set; } = new();
}

View File

@@ -0,0 +1,16 @@
namespace RobotNet.RobotShares.VDA5050.FactsheetExtend;
public class Xloc
{
public double Front_vls_width { get; set; }
public double Front_vls_pose_x { get; set; }
public double Front_vls_pose_y { get; set; }
public double Front_vls_pose_yaw { get; set; }
public uint Front_vls_source_id { get; set; }
public double Rear_vls_width { get; set; }
public double Rear_vls_pose_x { get; set; }
public double Rear_vls_pose_y { get; set; }
public double Rear_vls_pose_yaw { get; set; }
public uint Rear_vls_source_id { get; set; }
}

View File

@@ -0,0 +1,12 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.InstantAction;
#nullable disable
public class ActionParameter
{
[Required]
public string Key { get; set; } = "";
[Required]
public string Value { get; set; } = "";
}

View File

@@ -0,0 +1,23 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.InstantAction;
#nullable disable
public enum BlockingType
{
NONE,
SOFT,
HARD
}
public class Action
{
[Required]
public string ActionType { get; set; } = "";
[Required]
public string ActionId { get; set; } = "";
public string ActionDescription { get; set; } = "";
[Required]
public string BlockingType { get; set; } = "";
public ActionParameter[] ActionParameters { get; set; } = [];
}

View File

@@ -0,0 +1,13 @@
namespace RobotNet.RobotShares.VDA5050.InstantAction;
#nullable disable
public class InstantActionsMsg
{
public uint HeaderId { get; set; }
public string Timestamp { get; set; } = "";
public string Version { get; set; } = "";
public string Manufacturer { get; set; } = "";
public string SerialNumber { get; set; } = "";
public Action[] Actions { get; set; } = [];
}

View File

@@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
public enum CorridorRefPoint
{
KINEMATICCENTER,
CONTOUR
}
public class Corridor
{
[Required]
public double LeftWidth { get; set; }
[Required]
public double RightWidth { get; set; }
public string CorridorRefPoint { get; set; } = "";
}

View File

@@ -0,0 +1,33 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
#nullable disable
public class Edge
{
[Required]
public string EdgeId { get; set; } = "";
[Required]
public int SequenceId { get; set; }
public string EdgeDescription { get; set; } = "";
[Required]
public bool Released { get; set; }
[Required]
public string StartNodeId { get; set; } = "";
[Required]
public string EndNodeId { get; set; } = "";
public double MaxSpeed { get; set; }
public double MaxHeight { get; set; }
public double MinHeight { get; set; }
public double Orientation { get; set; }
public string OrientationType { get; set; } = "";
public string Direction { get; set; } = "";
public bool RotationAllowed { get; set; }
public double MaxRotationSpeed { get; set; }
public double Length { get; set; }
public Trajectory Trajectory { get; set; }
public Corridor Corridor { get; set; } = new();
[Required]
public InstantAction.Action[] Actions { get; set; } = [];
}

View File

@@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
#nullable disable
public class EdgeLog
{
[Required]
public string EdgeId { get; set; } = "";
public string EdgeDescription { get; set; } = "";
[Required]
public string StartNodeId { get; set; } = "";
[Required]
public string EndNodeId { get; set; } = "";
public Trajectory Trajectory { get; set; } = new();
public InstantAction.Action[] Actions { get; set; } = [];
}

View File

@@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
#nullable disable
public class Node
{
[Required]
public string NodeId { get; set; } = "";
[Required]
public int SequenceId { get; set; }
public string NodeDescription { get; set; } = "";
[Required]
public bool Released { get; set; }
public NodePosition NodePosition { get; set; }
[Required]
public InstantAction.Action[] Actions { get; set; } = [];
}

View File

@@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
#nullable disable
public class NodeLog
{
[Required]
public string NodeId { get; set; } = "";
public string NodeDescription { get; set; } = "";
[Required]
public double X { get; set; }
[Required]
public double Y { get; set; }
[Required]
public double Theta { get; set; }
public InstantAction.Action[] Actions { get; set; } = [];
}

View File

@@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
#nullable disable
public class NodePosition
{
[Required]
public double X { get; set; }
[Required]
public double Y { get; set; }
public double Theta { get; set; }
public double AllowedDeviationXY { get; set; }
public double AllowedDeviationTheta { get; set; }
[Required]
public string MapId { get; set; } = "";
public string MapDescription { get; set; } = "";
}

View File

@@ -0,0 +1,21 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
#nullable disable
public class OrderLog
{
[Required]
public string Timestamp { get; set; } = "";
[Required]
public string SerialNumber { get; set; } = "";
[Required]
public string OrderId { get; set; } = "";
[Required]
public int OrderUpdateId { get; set; }
[Required]
public NodeLog[] Nodes { get; set; } = [];
[Required]
public EdgeLog[] Edges { get; set; } = [];
}

View File

@@ -0,0 +1,29 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
#nullable disable
public class OrderMsg
{
[Required]
public uint HeaderId { get; set; }
[Required]
public string Timestamp { get; set; } = "";
[Required]
public string Version { get; set; } = "";
[Required]
public string Manufacturer { get; set; } = "";
[Required]
public string SerialNumber { get; set; } = "";
[Required]
public string OrderId { get; set; } = "";
[Required]
public int OrderUpdateId { get; set; }
public string ZoneSetId { get; set; } = "";
[Required]
public Node[] Nodes { get; set; } = [];
[Required]
public Edge[] Edges { get; set; } = [];
}

View File

@@ -0,0 +1,23 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Order;
#nullable disable
public class ControlPoint
{
[Required]
public double X { get; set; }
[Required]
public double Y { get; set; }
public double Weight { get; set; }
}
public class Trajectory
{
[Required]
public int Degree { get; set; }
[Required]
public double[] KnotVector { get; set; } = [];
[Required]
public ControlPoint[] ControlPoints { get; set; } = [];
}

View File

@@ -0,0 +1,25 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
#nullable disable
public enum ActionStatus
{
WAITING,
INITIALIZING,
RUNNING,
PAUSED,
FINISHED,
FAILED,
}
public class ActionState
{
public string ActionType { get; set; }
[Required]
public string ActionId { get; set; }
public string ActionDescription { get; set; }
[Required]
public string ActionStatus { get; set; }
public string ResultDescription { get; set; }
}

View File

@@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
public class BatteryState
{
[Required]
public double BatteryCharge { get; set; }
public double BatteryVoltage { get; set; }
[Range(0, 100, ErrorMessage = "Value for BatteryHealth must be between 0 and 100.")]
public double BatteryHealth { get; set; }
[Required]
public bool Charging { get; set; }
public double Reach { get; set; }
}

View File

@@ -0,0 +1,19 @@
using RobotNet.RobotShares.VDA5050.Order;
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
#nullable disable
public class EdgeState
{
[Required]
public string EdgeId { get; set; }
[Required]
public int SequenceId { get; set; }
public string EdgeDescription { get; set; }
[Required]
public bool Released { get; set; }
public Trajectory Trajectory { get; set; }
}

View File

@@ -0,0 +1,29 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
#nullable disable
public enum ErrorLevel
{
NONE,
WARNING,
FATAL
}
public class ErrorReferences
{
[Required]
public string ReferenceKey { get; set; }
[Required]
public string ReferenceValue { get; set; }
}
public class Error
{
[Required]
public string ErrorType { get; set; }
public ErrorReferences[] ErrorReferences { get; set; }
public string ErrorDescription { get; set; }
public string ErrorHint { get; set; }
[Required]
public string ErrorLevel { get; set; }
}

View File

@@ -0,0 +1,27 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
#nullable disable
public enum InfoLevel
{
INFO,
DEBUG
}
public class InfomationReferences
{
[Required]
public string ReferenceKey { get; set; }
[Required]
public string ReferenceValue { get; set; }
}
public class Information
{
[Required]
public string InfoType { get; set; }
public InfomationReferences[] InfoReferences { get; set; }
public string InfoDescription { get; set; }
[Required]
public string InfoLevel { get; set; }
}

View File

@@ -0,0 +1,16 @@
using RobotNet.RobotShares.VDA5050.Factsheet;
namespace RobotNet.RobotShares.VDA5050.State;
#nullable disable
public class Load
{
public string LoadId { get; set; }
public string LoadType { get; set; }
public string LoadPosition { get; set; }
public BoundingBoxReference BoundingBoxReference { get; set; }
public LoadDimensions LoadDimensions { get; set; }
public double Weight { get; set; }
}

View File

@@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
public enum MapStatus
{
Enabled,
Disabled,
}
public class Map
{
[Required]
public string MapId { get; set; } = string.Empty;
[Required]
public string MapVersion { get; set; } = string.Empty;
public string MapDescription { get; set; } = string.Empty;
[Required]
public string MapStatus { get; set; } = string.Empty;
}

View File

@@ -0,0 +1,30 @@
using RobotNet.RobotShares.VDA5050.Order;
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
#nullable disable
public class NodeState
{
[Required]
public string NodeId { get; set; }
[Required]
public int SequenceId { get; set; }
public string NodeDescription { get; set; }
[Required]
public bool Released { get; set; }
public NodePosition NodePosition { get; set; }
}
public class NodePosition
{
[Required]
public double X { get; set; }
[Required]
public double Y { get; set; }
public double Theta { get; set; }
[Required]
public string MapId { get; set; } = "";
}

View File

@@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
public enum EStop
{
AUTOACK,
MANUAL,
REMOTE,
NONE,
}
public class SafetyState
{
[Required]
public string? EStop { get; set; }
[Required]
public bool FieldViolation { get; set; }
}

View File

@@ -0,0 +1,61 @@
using RobotNet.RobotShares.VDA5050.Visualization;
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.State;
#nullable disable
public enum OperatingMode
{
AUTOMATIC,
SEMIAUTOMATIC,
MANUAL,
SERVICE,
TEACHIN,
}
public class StateMsg
{
[Required]
public uint HeaderId { get; set; }
[Required]
public string Timestamp { get; set; }
[Required]
public string Version { get; set; }
[Required]
public string Manufacturer { get; set; }
[Required]
public string SerialNumber { get; set; }
public Map[] Maps { get; set; } = [];
[Required]
public string OrderId { get; set; }
[Required]
public int OrderUpdateId { get; set; }
public string ZoneSetId { get; set; }
[Required]
public string LastNodeId { get; set; }
[Required]
public int LastNodeSequenceId { get; set; }
[Required]
public bool Driving { get; set; }
public bool Paused { get; set; }
public bool NewBaseRequest { get; set; }
public double DistanceSinceLastNode { get; set; }
[Required]
public string OperatingMode { get; set; }
[Required]
public NodeState[] NodeStates { get; set; } = [];
[Required]
public EdgeState[] EdgeStates { get; set; } = [];
public AgvPosition AgvPosition { get; set; } = new();
public Velocity Velocity { get; set; } = new();
public Load[] Loads { get; set; } = [];
[Required]
public ActionState[] ActionStates { get; set; } = [];
[Required]
public BatteryState BatteryState { get; set; } = new();
[Required]
public Error[] Errors { get; set; } = [];
public Information[] Information { get; set; } = [];
[Required]
public SafetyState SafetyState { get; set; } = new();
}

View File

@@ -0,0 +1,35 @@
namespace RobotNet.RobotShares.VDA5050.Type;
public enum ActionType
{
startPause, // No actionParameters
stopPause, // No actionParameters
startCharging, // ActionParameters {CHARGER_IP, CHARGER_PORT, X, Y, THETA}
stopCharging, // ActionParameters {X, Y, THETA}
initPosition, // ActionParameters {X, Y, THETA, MAP_ID, LAST_NODE_ID}
stateRequest, // No actionParameters
logReport, // No actionParameters
pick, // No actionParameters
drop, // No actionParameters
detectObject, // No actionParameters
finePositioning, // ActionParameters {X, Y, THETA, MAP_ID, LAST_NODE_ID}
waitForTrigger, // No actionParameters
cancelOrder, // No actionParameters
factsheetRequest, // No actionParameters
setDynparam, // ActionParameters {PARAM_NAME, PARAM_TYPE, PARAM_VALUE}
saveDynparamRuntime, // No actionParameters
loadDynparamRuntime, // No actionParameters
loadDynparamDefault, // No actionParameters
getDynparamRuntime, // No actionParameters
controlLight, // ActionParameters {LIGHT_TYPE, CONTROL_TYPE}
controlFan, // ActionParameters {CONTROL_TYPE}
controlSpeaker, // ActionParameters {SONG_NUMBER, CONTROL_TYPE}
controlSafetyField, // ActionParameters {FIELD_TYPE, CONTROL_TYPE}
startInPallet, // ActionParameters {X, Y, THETA}
startOutPallet, // ActionParameters {X, Y, THETA}
rotate, // ActionParameters {THETA}
setMap, // ActionParameter {MAP_ID}
}

View File

@@ -0,0 +1,23 @@
namespace RobotNet.RobotShares.VDA5050.Type;
public enum InformationType
{
connection_server,
order,
control_navigation,
robot_general
}
public enum InformationReferencesKey
{
count_retry,
robot_area,
robot_state,
}
public enum InformationMMGArea
{
CHARGING,
WORKING,
HOME,
}

View File

@@ -0,0 +1,7 @@
namespace RobotNet.RobotShares.VDA5050.Type;
public enum LoadType
{
PALLET,
GOODS
}

View File

@@ -0,0 +1,17 @@
namespace RobotNet.RobotShares.VDA5050.Type;
public enum ManualActionType
{
RELEASE,
GO_HOME,
GO_CHARGING,
STOP_CHARGING,
MOVE_TO_NODE,
PICK_PALLET,
DROP_PALLET,
FACTSHEET_REQUEST,
SET_MAP,
PICK,
DROP,
CHARGING
}

View File

@@ -0,0 +1,29 @@
using RobotNet.RobotShares.VDA5050.State;
using System.Text;
namespace RobotNet.RobotShares.VDA5050;
public class VDA5050Helper
{
public static string ConvertErrorDetail(IEnumerable<Error> errors)
{
string errorsType = "";
foreach (var error in errors)
{
if (error == errors.Last()) errorsType += $"{error.ErrorType}";
else errorsType += $"{error.ErrorType}, ";
}
StringBuilder errorStr = new($"Robot có lỗi: [{errorsType}]\n");
foreach (var error in errors)
{
string errorDes = $"- {error.ErrorType}: {error.ErrorDescription}\n";
errorStr.Append(errorDes.PadLeft(errorDes.Length + 3));
foreach (var refer in error.ErrorReferences)
{
string errorRefer = $"+ {refer.ReferenceKey}: {refer.ReferenceValue}\n";
errorStr.Append(errorRefer.PadLeft(errorRefer.Length + 9));
}
}
return !errors.Any() ? "" : errorStr.ToString();
}
}

View File

@@ -0,0 +1,19 @@
namespace RobotNet.RobotShares.VDA5050;
#nullable disable
public class VDA5050Setting
{
public bool ServerEnable { get; set; }
public string HostServer { get; set; }
public int Port { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
public string Manufacturer { get; set; }
public string Version { get; set; }
public int Repeat { get; set; }
public int ConnectionTimeoutSeconds { get; set; }
public int ConnectionBacklog { set; get; }
public int KeepAliveInterval { get; set; }
public int CheckingRobotMsgTimout { get; set; }
}

View File

@@ -0,0 +1,12 @@
namespace RobotNet.RobotShares.VDA5050;
public static class VDA5050Topic
{
public const string Connection = "connection";
public const string Order = "order";
public const string InstantActions = "instantActions";
public const string State = "state";
public const string Visualization = "visualization";
public const string Factsheet = "factsheet";
public const string FactsheetExtend = "factsheetExtend";
}

View File

@@ -0,0 +1,21 @@
using System.ComponentModel.DataAnnotations;
namespace RobotNet.RobotShares.VDA5050.Visualization;
#nullable disable
public class AgvPosition
{
[Required]
public double X { get; set; }
[Required]
public double Y { get; set; }
[Required]
public string MapId { get; set; }
[Required]
public double Theta { get; set; }
[Required]
public bool PositionInitialized { get; set; }
public double LocalizationScore { get; set; }
public double DeviationRange { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace RobotNet.RobotShares.VDA5050.Visualization;
public class Velocity
{
public double Vx { get; set; }
public double Vy { get; set; }
public double Omega { get; set; }
}

View File

@@ -0,0 +1,16 @@
namespace RobotNet.RobotShares.VDA5050.Visualization;
#nullable disable
public class VisualizationMsg
{
public uint HeaderId { get; set; }
public string Timestamp { get; set; }
public string Version { get; set; }
public string Manufacturer { get; set; }
public string SerialNumber { get; set; }
public string MapId { get; set; }
public string MapDescription { get; set; }
public AgvPosition AgvPosition { get; set; } = new();
public Velocity Velocity { get; set; } = new();
}