Skip to content

Latest commit

 

History

History
109 lines (92 loc) · 3.34 KB

README.md

File metadata and controls

109 lines (92 loc) · 3.34 KB

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