Skip to content
/ mROS Public

A light-weighted runtime environment for ROS nodes onto embedded micro-controller

License

Notifications You must be signed in to change notification settings

mROS-base/mROS

Repository files navigation

mROS

A lightweight runtime environment of ROS1 nodes onto embedded systems

Supported Platform

Development Platform/Tools for Host PC

  • IDE: Atollic TrueSTUDIO
    • Windows 10 Pro
    • Ubuntu 16.04.5
      • Currently we tested v.8.0.0, v.9.0.1 and v.9.1.0
  • CUI
    • macOS High Sierra 10.13.6 / arm-none-eabi version 5.4.1 20160609 (Launchpad distribution)
    • Ubuntu 16.04 LTS / gcc-arm-none-eabi version 4.9.3 20150529 (apt package)
      • $ sudo apt install gcc-arm-none-eabi
    • Ubuntu 14.04.5 LTS / gcc-arm-none-eabi version 4.9.3 20150529 (Launchpad distribution)

Please let us know if you could develop and build another host OS.

SW Components

  • asp-gr_peach_gcc-mbed
    • Open-source Software Platform Based on TOPPERS/ASP Kernel, mbed and Arduino Library for Renesas GR-PEACH.
    • located at asp_mbed/asp-gr_peach_gcc-mbed as gitsubmodule
  • opencv-lib
    • located at opencv-lib as gitsubmodule
  • TOPPERS configurator
    • located at asp_mbed/cfg_binary
    • (for Win) cfg-mingw-static-1_9_6.zip
    • (for Linux) cfg-linux-static-1_9_6.gz
      • $ sudo apt install libstdc++6 lib32stdc++6
    • (for macOS) cfg-osx-static-1_9_5.gz

Features

  • Topic based publish/subscribe communication with host devices (such as laptop)
  • Automatic generation of header files for customized message types

How to get

$ git clone --recursive https://github.com/tlk-emb/mROS

--recursive option is mandatory since we use git submodules for SW components

Build

For host device (ROS applications)

source /opt/ros/kinetic/setup.bash
cd ros_catkin_ws/
catkin_make

For embedded device (mROS applications)

Configuring IP adderss
  • Edit mros_ws/<app>/mros_config/mros_sys_config.h
    • Set the value of MROS_MASTER_IPADDR as the IP address of the host PC
    • Set the value of MROS_NODE_IPADDR as the IP address of the embedded device,
      or set the value of MROS_NODE_USE_DHCP as 1
(Optional) For generation of customized message
  • Describe GEN_MSGS = true on app's Makefile
  • Edit app's JSON file such as mros_ws/custom_pubsub/msg_app.json for the customization of message types if you prefer
    • Specify headers for message types that are used in your app such as follows
    "including_msgs": [
      "custom_pubsub/UserTypeTest.h"
    ]
    
    • Specify depending packages for message types such as
    "depending_packages": [
      "std_msgs",
      "custom_pubsub"
    ]
    
  • python2 and jinja2 python package is needed to operate the message generation script
    • pip install jinja2
For CUI (terminal)
  • cd to project dir such as mros_ws/string_pubsub/
  • Describe USE_TRUESTUDIO = false or comment-out such as #USE_TRUESTUDIO = true on Makefile
  • $ make
For TrueSTUDIO
  • Specify and open mros_ws as workspace
  • Import mros_ws/* such as string_pubsub
  • Describe USE_TRUESTUDIO = true on Makefile
  • You can build and debug the project on GUI

Examples

string_pubsub

  • pub/sub communication between host/ROS and embedded/mROS.
    • Each message is realized as String type.
  • mROS publishes the distance to obstacle by ultrasonic sensors
    • We use SainSmart HC-SR04
    • Start/Stop of publication can be switched by USER push-SW
  • mROS subscribes the command for blinking LED
    • red / green / blue can be published from host/ROS

custom_pubsub

  • pub/sub communication with customized MessageType
  • custom_pub_sub/UserTypeTest
    • PersonName nameVal
      • string firstName
      • string lastName
    • LEDValues ledVal
      • float32 red
      • float32 green
      • float32 blue
  • mROS subscribes the customized message
    • Print full name
    • Blink LED
  • mROS publishes the subscription data to host device

image_publisher

  • mROS publishes image data from camera
  • Host can subscribe the image with $ rosrun image_view image_view /image:=/image_raw

Limitation & TODO

  • Currently we cannot support following primitive types
    • Time
    • Duration
    • Header
  • Support the edge detection example application

License

References