Initial Commit
commit
12333b804d
|
@ -0,0 +1,5 @@
|
|||
bin/
|
||||
obj/
|
||||
/packages/
|
||||
riderModule.iml
|
||||
/_ReSharper.Caches/
|
|
@ -0,0 +1,13 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider ignored files
|
||||
/projectSettingsUpdater.xml
|
||||
/.idea.ln.motion.iml
|
||||
/contentModel.xml
|
||||
/modules.xml
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||
</project>
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ln.motion", "ln.motion\ln.motion.csproj", "{67ACC05F-C275-449D-B0C4-86097A496DF1}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{67ACC05F-C275-449D-B0C4-86097A496DF1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{67ACC05F-C275-449D-B0C4-86097A496DF1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{67ACC05F-C275-449D-B0C4-86097A496DF1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{67ACC05F-C275-449D-B0C4-86097A496DF1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,25 @@
|
|||
namespace ln.motion
|
||||
{
|
||||
public abstract class Ax
|
||||
{
|
||||
public virtual float CurrentSpeed { get; }
|
||||
public virtual float CurrentPosition { get; }
|
||||
public virtual AxValues CurrentValues => new AxValues() {Speed = CurrentSpeed, Position = CurrentPosition};
|
||||
|
||||
public virtual float TargetSpeed { get; set; }
|
||||
public virtual float TargetPosition { get; set; }
|
||||
|
||||
public virtual AxValues TargetValues
|
||||
{
|
||||
get => new AxValues() {Speed = TargetSpeed, Position = TargetPosition};
|
||||
set
|
||||
{
|
||||
TargetPosition = value.Position;
|
||||
TargetSpeed = value.Speed;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool IsEnabled { get; }
|
||||
public virtual bool IsFaulted { get; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
namespace ln.motion
|
||||
{
|
||||
public struct AxValues
|
||||
{
|
||||
public float Speed;
|
||||
public float Position;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
namespace ln.motion
|
||||
{
|
||||
public abstract class DriveController
|
||||
{
|
||||
public abstract void Initialize();
|
||||
|
||||
public abstract bool IsOnline { get; }
|
||||
|
||||
public abstract bool GetAxCurrentValues(out AxValues[] axValuesArray);
|
||||
public abstract bool GetAxTargetValues(out AxValues[] axValuesArray);
|
||||
public abstract bool SetAxTargetValues(AxValues[] axValuesArray);
|
||||
|
||||
public virtual bool SetAxTargetValues(int ax, AxValues axValues)
|
||||
{
|
||||
if (GetAxTargetValues(out AxValues[] axValuesArray))
|
||||
{
|
||||
axValuesArray[ax] = axValues;
|
||||
return SetAxTargetValues(axValuesArray);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System.Numerics;
|
||||
|
||||
namespace ln.motion
|
||||
{
|
||||
public abstract class Kinematic
|
||||
{
|
||||
public Kinematic()
|
||||
{
|
||||
}
|
||||
|
||||
public abstract bool Direct(AxValues[] axValuesArray, out Matrix4x4 position);
|
||||
public abstract bool Inverse(Matrix4x4 position, AxValues[] axValues);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
|
||||
namespace ln.motion
|
||||
{
|
||||
public class MotionController
|
||||
{
|
||||
public Kinematic Kinematic { get; }
|
||||
|
||||
public MotionController(Kinematic kinematic)
|
||||
{
|
||||
Kinematic = kinematic;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
Loading…
Reference in New Issue