GithubHelp home page GithubHelp logo

sichitong / ros-lite Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azu-lab/ros-lite

0.0 1.0 0.0 235 KB

License: BSD 3-Clause "New" or "Revised" License

CMake 1.42% C++ 18.68% C 0.30% Shell 0.76% Python 78.84%

ros-lite's Introduction

ROS-lite

ROS-lite is a static program placement platform for embedded multi-core multi-cluster systems. It's goal is to provide the means to automatically convert ROS node to application for embedded systems. It's current target is POSIX system. It's target dependent code is separated from core code, so you can easily port it to other systems.

ROS-lite consists of following components:

  • a lightweight implementation of ROS-like publish/subscribe functions
  • ROS bridge function
  • code conversion tools

Requirements

  • ROS kinetic (Ubuntu 16.04)

Build & Run

  1. Clone the repository

    $ git clone https://github.com/azu-lab/ros-lite.git
    
  2. Set environment variables

    $ cd ros-lite
    $ source source/appl/roslite/scripts/roslite_cli.sh
    
  3. Build

    $ rosl_build -app
    
  4. Run

    Start roscore:

    $ source /opt/ros/xinetic/setup.bash
    $ roscore
    

    Start nodes

    $ rosl_run
    

    After starting these programs, following messages will be printed from cluster-1 node .

    hello world
    hello world
    hello world
    ...
    

    These messages mean that "talker" node in cluster-1 publishes "hello world" to /chatter topic.

    Meanwhile, following messages will be printed from cluster-2 node.

    I heard: [hello world]
    I heard: [hello world] in listener2
    I heard: [hello world]
    I heard: [hello world] in listener2
    I heard: [hello world]
    I heard: [hello world] in listener2
    ...
    

    These messages mean that "listener" and "listner2" node in cluster-2 receive "hello world" from /chatter topic.

    The source codes of these nodes are found in following locations.

    source/appl/ros_src/nodes/talker/talker.cpp
    source/appl/ros_src/nodes/listener/listener.cpp
    source/appl/ros_src/nodes/listener/listener2.cpp
    

    These source codes are valid for ROS node, but these are now working as ROS-lite applications.

    ros_bridge is an application to connect ROS and ROS-bridge transparently. Thanks to this application, any ROS node can receive "hello world" from /chatter topic. Also, listener and listener2 can receve any /chatter messages published by any ROS node.

    ros_param_bridge is an application to get ROS paramters. In this case, the function of ros_param_bridge is not working because talker, listener, and listener2 does not use ROS parameter.

How to port ROS-node to ROS-lite

  1. Create directories for target ROS nodes in source/appl/ros_src/nodes, and put source codes of these node to these directory.

  2. Create node mapping file and put it to source/appl/ros_src/map. rosl_create_map will be helpful.

    usage of rosl_create_map:

    $ cd [ros-lite directory]
    $ source source/appl/roslite/scripts/roslite_cli.sh
    $ rosl_create_map [comma separated node list] -o [map file name]
    
  3. Generate source codes which are required to run target nodes on ROS-lite.

    $ cd [ros-lite directory]
    $ source source/appl/roslite/scripts/roslite_cli.sh
    $ rosl_map_gen [map file name]
    
  4. Put ROS message files required by target nodes in source/appl/ros_src/msg. msg files should be placed in directories which has the name same with message name space. (e.g. std_msgs)

  5. Generate message header files.

    $ rosl_msg_gen
    
  6. Build and run

    $ rosl_build
    $ rosl_run
    

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.