GithubHelp home page GithubHelp logo

routedisplay's Introduction

小车轨迹记录可视化上位机

项目使用PyQt构建,用于接收并可视化小车的移动轨迹。 App

使用方法

  1. 注意,本项目发送端需要设置波特率为115200,同时加载的背景图片路径和名称不能出现中文
  2. 在"轨迹保存长度"输入框内,设定希望可视化的轨迹时间长度。
  3. 设定坐标轴范围:
    • X min: X轴的最小范围
    • X max: X轴的最大范围
    • Y min: Y轴的最小范围
    • Y max: Y轴的最大范围
  4. 设定参数后,点击“更新画布大小”。你可以自定义背景图片,图片会被自动拉伸到你设定的坐标轴范围尺寸。
  5. 你可以直接输入字符串发送到串口。

接收与发送格式

本项目使用JSON格式进行串口通信。

  • 上位机接收格式如下:

    {"x": 0, "y": 124, "head": 0}

    其中xy是小车在2D地图上的世界坐标,head是小车的朝向,以Y轴正方向为0度,顺时针角度递增,范围是0~360度,数据类型全部为整形(int) 发送示例请参考Arduino例程:SendDemo.ino

  • 上位机发送格式如下:

    {"text": "start"}

    发送类型为字符串(string)类型,接收示例请参考Arduino例程,该实例输入发送"open"点亮D13的LED,"close"熄灭:RecDemo.ino

Python文件运行

运行环境的设定步骤如下:

  1. 克隆项目

    git clone https://github.com/lintheyoung/RouteDisplay
  2. 安装依赖

    pip install -r requirements.txt
  3. 运行项目

    python main.py

文件打包为exe

你可以使用Nuitka打包你的python文件为exe

nuitka --onefile --windows-icon-from-ico=myapp.ico --windows-disable-console --plugin-enable=pyqt5 main.py

routedisplay's People

Contributors

lintheyoung avatar

Stargazers

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