GithubHelp home page GithubHelp logo

controlcomponent's Introduction

Control Component Library

This library contains the projects ControlComponents.Core, ControlComponents.ML and ControlComponent.Frame.

  • ControlComponents.Core provides basic functionality to create ControlComponents as defined in BaSyx.

  • ControlComponents.ML provides basic functionality to extend ControlComponents with Reinforcement Learning specific interfaces.

  • ControlComponents.Frame provides the FrameControlComponent, which can be used to extract operation modes and use those in a different component. The relevant states and calls are synchronized between those two components.

This library supports netstandard2.0 to be used in Unity3D.

Usage

Compile the project by running dotnet build Use the resulting .dll files in your project to access control component feature of this library.

By extending the OperationMode class and overriding the state specific methods, you can inject your own logic and encapsulate it in a BaSys ControlComponent. Create or extend the ControlComponent class and pass OperationModes and OrderOutputs to it.

To use an OrderOutput you have three options:

  1. Pass a ControlComponent to the using ControlComponent on creation. In the constructor you can then create an Orderoutput with that ControlComponent.
  2. Pass the is of a ControlComponent to the using ControlComponent. In the constructor you can then create an Orderoutput and configure it via a IControlComponentProvider.
  3. Pass an already configured or not configured OrderOutput to the ControlComponent on creation. This is the best method if FrameControlComponents should be used.

You can find an example here in the PTS.ControlComponents project.

Contribution

  1. Prepare VSCode https://code.visualstudio.com/docs/languages/dotnet
  2. Follow this Project Structure
  3. You can use the dotnet cli to create new projects
  4. Try to implement specific, small and tested features. Create a pull request.

Testing

This project uses NUnit.

Usage

Run the following command to execute tests (dotnet test reference).

dotnet test

Using the following command creates a TestResult folder with the coverage results (coverage reference):

dotnet test --collect:"XPlat Code Coverage"

install reportgenerator to generate a test report. dotnet tool install -g dotnet-reportgenerator-globaltool. Run the following command (with the correct result id) to create a "coveragereport" folder with an index.html file to present the coverage results:

reportgenerator -reports:.\tests\ControlComponents.Core.Tests\TestResults\58238ace-ffed-4f17-8afa-d9a60792f957\coverage.cobertura.xml -targetdir:coveragereport -reporttypes:Html

Open the index.html file in your browser to access the results.

Test dependency packages

  1. Moq to provide Mock and Stub functionality
  2. coverlet.collector to provide test coverage plugin https://github.com/coverlet-coverage/coverlet/blob/master/README.md https://docs.microsoft.com/de-de/dotnet/core/testing/unit-testing-code-coverage?tabs=windows

Logs in Unit Tests by configure logger in code

https://github.com/NLog/NLog/wiki/Configure-from-code

controlcomponent's People

Contributors

dumdumin avatar

Stargazers

mormotomyia avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.