Giter Club home page Giter Club logo

corecontroller's Introduction

CoreController - 核心控制器

状态机叙述

机器人主要分为四个状态,状态之间的切换由遥控器操控:

  • 暂定流程是 按下功能键 ->进入状态问询/待机状态,四个按键对应四种不同状态
  • 若进入状态问询/待机状态一段时间后还没有收到按键消息,进行一次提示并
状态名称 状态代号 对应按键 功能
加工模式 Machining_Mode X 进入文件选择界面,选择文件之后,执行文件中的所有指令,执行完之后进入待机模式。
遥控模式 JoyStick_Mode Y 通过手柄操控机器人的移动,包括三个自由度的移动和吸盘的动作。
智能模式 Intelligent_Mode A 连接到对弈智能体,进行一次人机对弈,结束之后显示结果并进入待机模式。
待机模式 Standby_Mode B 待机状态,只接受功能键的状态信息。

总体工作流程

核心控制器对应了原先蓝图中的调节器,应该是最后启动的,在初始化环节的工作是:

  1. 所有模块的通信测试,参与测试的模块待定。
  2. 导入参数,定义所需变量。
  3. 机器人回初始位置,电机转动测试。
  4. 开启可视化窗口,发出一些声音/振动反馈。

接下来进入工作循环:

  1. 首先进行状态问询,确定工作状态
  • 待机模式下,只会接受手柄的功能键的状态,若按键没有被按下,则继续等待。
  • 加工模式下
    1. 首先进行文件选择的循环,通过手柄进行文件选择,或者选择有默认文件名的文件。
    2. 调用外部模块读取文件。
    3. 调用一个内部模块进行插补计算得到详细的运动流程。
    4. 开启内循环,进行运动执行,在其中仍然需要检测手柄功能键,若有按下就暂停执行
  • 遥控模式下
    1. 开启内循环获取手柄的状态。
    2. 左手遥感操作执行器前后左右运动。
    3. 右手摇杆操纵执行器上下运动。
    4. 左手按键控制执行器前后左右的定量运动,或称单步运动。
    5. 左右手的RT,LT键控制吸盘的动作。
  • 智能模式下
    1. 开启内循环,调用外部模块,在其中仍然需要检测手柄功能键,若有按下就暂停执行
    2. 检测图像信息,确定有没有棋子的增减。
    3. 另一方落子之后控制执行器走出一步

corecontroller's People

Contributors

lostcandyx 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.