TipsAndTricks/Creating Recipes for ROS modules: Difference between revisions

From Yocto Project
Jump to navigationJump to search
Line 1: Line 1:
== Introduction ==
== Introduction ==
[http://www.ros.org/ Robot Operating System] (ROS) isn't an OS but a set of modules for robotics applications that interact via a pub/sub interface. Thanks to meta-ros you can add a wide range of ROS modules to your OS build. But how do you add your own ROS module? This article covers creating a recipe for a ROS module. For this article we'll use the [https://github.com/dawonn/vectornav vectornav] module as an example.
[http://www.ros.org/ Robot Operating System] (ROS) isn't an OS but a set of modules for robotics applications that interact via a pub/sub interface. Thanks to [https://github.com/bmwcarit/meta-ros meta-ros] you can add a wide range of ROS modules to your OS build. But how do you add your own ROS module? This article covers creating a recipe for a ROS module. For this article we'll use the [https://github.com/dawonn/vectornav vectornav] module as an example. We'll also assume you already have meta-ros in your bblayers.conf.


== Starting with "devtool add" ==
== Starting with "devtool add" ==

Revision as of 17:18, 15 June 2017

Introduction

Robot Operating System (ROS) isn't an OS but a set of modules for robotics applications that interact via a pub/sub interface. Thanks to meta-ros you can add a wide range of ROS modules to your OS build. But how do you add your own ROS module? This article covers creating a recipe for a ROS module. For this article we'll use the vectornav module as an example. We'll also assume you already have meta-ros in your bblayers.conf.

Starting with "devtool add"

Standard practice for a creating a recipe is use devtool add. The github project doesn't have any releases, so let's use the git repo.

$ devtool add https://github.com/dawonn/vectornav

This completes OK, let's takr quick look at the recipe.

$ devtool edit-recpe vectornav
# Recipe created by recipetool
# This is the basis of a recipe and may need further editing in order to be fully functional.
# (Feel free to remove these comments when editing.)

# WARNING: the following LICENSE and LIC_FILES_CHKSUM values are best guesses - it is
# your responsibility to verify that the values are complete and correct.
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://vnccpplib/LICENSE.txt;md5=a3e2f266f2adb30b4ae17db437fa9727"

SRC_URI = "git://github.com/dawonn/vectornav;protocol=https"

# Modify these as desired
PV = "1.0+git${SRCPV}"
SRCREV = "497173f3ddbe21216d77d3b2021a5ef48a17ec4a"

S = "${WORKDIR}/git"

# NOTE: unable to map the following CMake package dependencies: catkin
inherit cmake

# Specify any options you want to pass to cmake using EXTRA_OECMAKE:
EXTRA_OECMAKE = ""

It seems to have correctly detected a cmake project. Let's try and built it

$ devtool build vectornav
| CMake Error at CMakeLists.txt:7 (find_package):
|   By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has
|   asked CMake to find a package configuration file provided by "catkin", but
|   CMake did not find one.