Top/text/ROS/ProgrammingGuide
English | Japanese
English | Japanese

Menu

  • Top
  • Akihiko Yamaguchi 山口 明彦
  • Project プロジェクト
  • Text テキスト
  • Recent articles 最近の記事
  • Articles 記事一覧 (a to z)
  • Search 検索
Access: 3/1362 - Admin

Programming Guide

  • ROS developer's guide

Minimize ROS Dependency †

  • The purpose of using ROS is connecting your program to other ROS packages.
  • In general, your code might be used in other situations where ROS is not used.
  • In order to increase the reusability of ROS code, minimize the ROS dependency of your code.
  • Separate ROS dependent code (nodes, publishers, etc.) from ROS independent code as classes, functions, etc.
  • Example of making a node xxx (e.g. face tracking):
    • Create a ROS-independent unit xxx.h and xxx.cpp
    • Create a ROS-dependent code xxx_node.cpp
    • Write main algorithms in xxx.{h,xxx.cpp}
    • Write a ROS interface (node, subscribers, publishers, ...) in xxx_node.cpp where xxx.h is imported to use the main algorithms.



Last-modified:2017-10-02 (Mon) 20:01:28 (2842d)
Link: text/ROS(2842d)
Site admin: Akihiko Yamaguchi.
Written by: Akihiko Yamaguchi.
System: PukiWiki 1.5.0. PHP 5.2.17. HTML conversion time: 0.007 sec.