(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Adding your own ROS code.

Description: Creating, and compiling ROS code on the host, and adding it to the Yocto image.

Tutorial Level: INTERMEDIATE

Next Tutorial: Adding your own layer

adding your own ros code from the host

  • Create a new catkin package
  • Create the python talker and listener files.
  • Make sure to update CMakeLists.txt and package.xml
  • Make sure to chmod +x the python files
  • Make a .bb file (../meta-ros/recipes-ros/foobar/foobar.bb)

SRC_URI = "file:///home/jfstepha/catkin_ws/src/clanton_tutorial"
SECTION = "devel"

LIC_FILES_CHKSUM = "file:///home/jfstepha/foobar/lic.txt;md5=d440307f45f8d0776b0ce3be6de70d48"
DEPENDS = "roscpp catkin rospy std-msgs"
RDEPENDS = "roscpp rospy std-msgs"

S = "${WORKDIR}/clanton_tutorial"
inherit pkgconfig catkin
ROS_SPN = "ros_foobar"

FILES_${PN} += "/usr/share/clanton_tutorial/package.xml"
FILES_${PN} += "/usr/share/clanton_tutorial/cmake/clanton_tutorialConfig.cmake"
FILES_${PN} += "/usr/share/clanton_tutorial/cmake/clanton_tutorialConfig-version.cmake"

do_fetch () {
   cp -r /home/jfstepha/catkin_ws/src/clanton_tutorial ${WORKDIR}
  • add foo.bb to ../meta-clanton-distro/recipes-core/images/image-full.bb
  • bitbake and copy it to the card.

Wiki: IntelGalileo/IntelGalileoYoctoAddingCode (last edited 2014-02-09 00:44:59 by JonStephan)