Coder Social home page Coder Social logo

roscar's Introduction

ROS Car

用以学习、展示 ROS 系统应用的树莓派小车模型 。

1. 前言

开始这个项目的目的有三:

  • 一是:学习 ROS 系统框架并进行实践

    ROS 是目前比较热门的系统,它的顶层框架简单,通过官方文档 https://www.ros.org 两三天就可建立起相关框架概念。在了解 ROS 基础架构之后需要在实际场景中进行实践,这就是此项目的目的之所在。

  • 二是:学习 Python

    虽之前零零星星看过 Python,也用之实现过小项目,但终因没有进行系统地学习与实践,以至于心中一直不认为自己已掌握此编程语言。所以想借此项目继续 Python 项目的学习。

    通过几次测试发现,ROS kinetic 版本与 python3 并不能很好的兼容。又因需配合朋友一起学习 ROS,所以暂不能在此项目中使用 ROS 后续版本。 因此决定,将 python 学习计划取消,改为用 C++ 来实现此项目。

  • 三是:学习通过 github 进行代码管理与使用

    虽多年前就已经在 github 上观摩、学习各位大神的作品,但自己一直没在上面建过开源项目。所以也借此机会丰富自己的 github 技能。

此项目以概念学习为主,所以在架构设计、系统性能等方面必然有所欠缺。如大家在此方面有所要求,还请参阅其它相关项目,在此不再详述。

2. 项目

2.1. 开发准备

2.1.1. 硬件

  • PC 开发环境

  • 树莓派及相关配件

    • 树莓派 2B 及以上版本均可。如需实现无线操作,可在 Raspberry Pi 2B 上接入 USB 转 蓝牙 或 wifi 模块。为方便,也可使用自带 wifi 的树莓派版本(如:Raspberry Pi 3B 及以上)。
    • 步进电机及控制电路板。
    • 其它零配件,如 车架、摄像头固定架、设备电源、车轮等。

2.1.2. 软件

2.2. 系统框架

2.2.1. Top View

从最上层看, RosCar 系统如下图所示:

Top View

  • 外部系统

    外部系统包括操作、管理人员以及其它系统、程序等。这部分不在本系统管理范围内。外部系统可利用本系统提供的 UI 、API 以及监控系统与本系统进行交互操作。

  • 控制器:

    此部分为 ROS Car 的管理服务器。对外,通过 CLI 及 API 与外部系统/人员进行交互。对内,通过 ROS 系统实现对终端设备的操作与管理。

  • 终端设备:

    此为 ROS Car 终端。在此项目中明确为:基于树莓派的带摄像头的可远程控制的小车。

2.3. Interface

项目中各模块间的接口如下图所示:

Interface

  • 控制器与终端的接口链路将使用 ROS 系统内部通讯机制。
  • 控制器对外将提供 CLI 及 API 接口, 外部系统可通过接口与本系统进行交互。
  • 某些特殊类型数据流接口,如:视频流传输接口,将在特定章节中加以说明。

从终端用户的角度预测,本系统对外的接口需要提供的功能如下用例图所示:

Interface

2.4. 基础架构

ROS Car 项目基础架构如下图所示:

Infrastructure

2.5. 子模块说明

2.5.1. cli

TBD

2.5.2. interface

TBD

2.5.3. pilot

Service
  • Info

    ---
    string id
    string type
    string name
    
  • Move

    float32 angle
    float32 power
    float32 duration
    ---
    int32 err_code
    string err_msg
    

2.5.4. roscar_common

TBD

2.5.5. video_node

Message
  • VideoStream

    int8[] buffer
    
Service
  • StreamDeregister

    string node_id
    string video_id
    ---
    int32 err_code
    string err_msg
    
  • StreamForward

    string node_id
    string video_id
    ---
    int32 err_code
    string err_msg
    string topic
    
  • StreamList

    ---
    string video_list
    
  • StreamRegister

    string node_id
    string video_id
    string addr
    int32 port
    ---
    int32 err_code
    string err_msg
    

2.5.6. video_recorder

TBD

3. 通讯协议

为在外部系统与 ROS Car 服务器 以及 ROS Car 服务器 与 ROS Car 终端之间进行数据交互, 在项目中设计了一套简易通讯协议。 关于此通讯协议的详细内容,请参见:

RCMP

4. ROS Car Server

TBD.

5. ROS Car

5.1. ROS Car 框架图

ROS Car 框架如下图所示

Car Infrastructure

6. ROS Interfaces

TBD.

7. 其它

7.1. 推荐列表

roscar's People

Contributors

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