{"id":1683,"date":"2011-08-17T00:00:00","date_gmt":"2011-08-16T15:00:00","guid":{"rendered":"http:\/\/oohito.com\/nqthm\/archives\/1683"},"modified":"2011-08-17T00:00:00","modified_gmt":"2011-08-16T15:00:00","slug":"ros%e8%a6%9a%e3%81%88%e6%9b%b8%e3%81%8d%e3%80%8cros%e3%83%8e%e3%83%bc%e3%83%89%e3%81%ae%e7%90%86%e8%a7%a3%e3%80%8d-2","status":"publish","type":"post","link":"https:\/\/oohito.com\/nqthm\/archives\/1683","title":{"rendered":"ROS\u899a\u3048\u66f8\u304d\u300cROS\u30ce\u30fc\u30c9\u306e\u7406\u89e3\u300d"},"content":{"rendered":"<div class=\"section\">\n<p><a href=\"http:\/\/www.ros.org\/wiki\/ROS\/Tutorials\/UnderstandingNodes\" target=\"_blank\" rel=\"noopener\">http:\/\/www.ros.org\/wiki\/ROS\/Tutorials\/UnderstandingNodes<\/a> \u3088\u308a<\/p>\n<p>ROS\u306b\u304a\u3051\u308b\u30b0\u30e9\u30d5\u306e\u6982\u5ff5<\/p>\n<p>\u30ce\u30fc\u30c9(Node)\uff1a\u30ce\u30fc\u30c9\u306fROS\u3092\u4f7f\u3046\u5b9f\u884c\u5f62\u5f0f\u3067\u3001\u4ed6\u306e\u30ce\u30fc\u30c9\u3068\u4e92\u3044\u306b\u901a\u4fe1\u3067\u304d\u308b\u3002<\/p>\n<p>\u30c8\u30d4\u30c3\u30af(Topic)\uff1a\u30ce\u30fc\u30c9\u306f\u30c8\u30d4\u30c3\u30af\u306b\u5bfe\u3057\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u914d\u4fe1\uff08Publish\uff09\u3059\u308b\u3002\u307e\u305f\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d7\u4fe1\u3059\u308b\u305f\u3081\u306b\u30c8\u30d4\u30c3\u30af\u3092\u8cfc\u8aad\uff08Subscribe\uff09\u3059\u308b\u3002<\/p>\n<p>\u30e1\u30c3\u30bb\u30fc\u30b8(Message)\uff1a\u30c8\u30d4\u30c3\u30af\u3078\u306e\u914d\u4fe1\u3084\u8cfc\u8aad\u306e\u969b\u306b\u7528\u3044\u3089\u308c\u308bROS\u30c7\u30fc\u30bf\u578b\u306e\u3053\u3068\u3002<\/p>\n<p>\u30de\u30b9\u30bf\u30fc(Master)\uff1aROS\u306e\u30cd\u30fc\u30e0\u30b5\u30fc\u30d3\u30b9\u306e\u3053\u3068\u3002\u4e92\u3044\u306b\u30ce\u30fc\u30c9\u3092\u898b\u3064\u3051\u308b\u52a9\u3051\u3068\u306a\u308b\u3002<\/p>\n<p>rosout\uff1aROS\u7248\u306estdout, stderr\u306e\u3053\u3068\u3002<\/p>\n<p>roscore\uff1a\u30de\u30b9\u30bf\u30fc\uff0brosout\uff0b\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u30b5\u30fc\u30d0\u30fc<\/p>\n<p>\u30ce\u30fc\u30c9\u306fROS\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3063\u3066\u4ed6\u306e\u30ce\u30fc\u30c9\u3068\u901a\u4fe1\u3057\u3001\u30c8\u30d4\u30c3\u30af\u306b\u5bfe\u3057\u3066\u914d\u4fe1\u30fb\u8cfc\u8aad\u3067\u304d\u308b\u3002\u307e\u305f\u3001\u30b5\u30fc\u30d3\u30b9\u3092\u63d0\u4f9b\u3057\u305f\u308a\u5229\u7528\u3067\u304d\u308b\u3002<\/p>\n<p>ROS\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30e9\u30a4\u30d6\u30e9\u30ea\u306f\u3001\u4ed6\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u66f8\u304b\u308c\u305f\u30ce\u30fc\u30c9\u3068\u901a\u4fe1\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3042\u308b\u3002rospy\u306fPython\u7528\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3042\u308a\u3001roscpp\u306fC++\u7528\u306e\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3042\u308b\u3002<\/p>\n<p>roscore\u306f\u3001ROS\u3092\u5229\u7528\u3059\u308b\u969b\u306b\u5b9f\u884c\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9f\u884c\u3059\u308b\u3002<\/p>\n<pre>\nroscore\n<\/pre>\n<p>roscore\u304c\u8d77\u52d5\u3057\u306a\u3044\u5834\u5408\u306f\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u8a2d\u5b9a\u306b\u554f\u984c\u306e\u3042\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3002\u306a\u304a\u3001roscore\u306f\u591a\u91cd\u8d77\u52d5\u306f\u3067\u304d\u305a\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/p>\n<p>rosnode\u306f\u3001\u5b9f\u884c\u4e2d\u306e\u30ce\u30fc\u30c9\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u8868\u793a\u3059\u308b\u3002rosnode list\u3067\u3001\u5b9f\u884c\u4e2d\u306e\u30ce\u30fc\u30c9\u306e\u4e00\u89a7\u304c\u8868\u793a\u3055\u308c\u308b\u3002<\/p>\n<p>rosout\u306f\u5e38\u306b\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u30ce\u30fc\u30c9\u3067\u3001\u30c7\u30d0\u30c3\u30b0\u51fa\u529b\u3092\u8a18\u9332\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3042\u308b\u3002<\/p>\n<p>rosnode info\u306f\u3001\u7279\u5b9a\u306e\u30ce\u30fc\u30c9\u306b\u95a2\u3059\u308b\u60c5\u5831\u3092\u8868\u793a\u3059\u308b\u3002\u4ee5\u4e0b\u306f\u4f7f\u7528\u4f8b\u3002<\/p>\n<pre>\nrosnode info \/rosout\n<\/pre>\n<p>rosnode info\u306b\u3088\u308a\u3001\u30ce\u30fc\u30c9\u304c\u914d\u4fe1\u30fb\u8cfc\u8aad\u3059\u308b\u30c8\u30d4\u30c3\u30af\u3084\u30b5\u30fc\u30d3\u30b9\u304c\u308f\u304b\u308b\u3002<\/p>\n<p>rosrun\u306f\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u5185\u306e\u30ce\u30fc\u30c9\u3092\u76f4\u63a5\u5b9f\u884c\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3067\u3042\u308b\u3002<\/p>\n<pre>\nrosrun [\u30d1\u30c3\u30b1\u30fc\u30b8\u540d] [\u30ce\u30fc\u30c9\u540d]\n<\/pre>\n<p>turtlesim\u30d1\u30c3\u30b1\u30fc\u30b8\u306eturtlesim_node\u3092\u5b9f\u884c\u3059\u308b\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3059\u308b\u3002<\/p>\n<pre>\nrosrun turtlesim turtlesim_node\n<\/pre>\n<p>\u30ce\u30fc\u30c9\u306b\u5225\u9014\u540d\u524d\u3092\u4ed8\u3051\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u3002<\/p>\n<pre>\nrosrun turtlesim turtlesim_node __name:=my_turtle\n<\/pre>\n<p>rosnode ping\u3067\u3001\u540d\u524d\u3092\u4ed8\u3051\u305f\u30ce\u30fc\u30c9\u304c\u8d77\u52d5\u3057\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3067\u304d\u308b\u3002<\/p>\n<pre>\nrosnode ping my_turtle\n<\/pre>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/www.ros.org\/wiki\/ROS\/Tutorials\/UnderstandingNodes \u3088\u308a ROS\u306b\u304a\u3051\u308b\u30b0\u30e9\u30d5\u306e\u6982\u5ff5 \u30ce\u30fc\u30c9(Node)\uff1a\u30ce\u30fc\u30c9\u306fROS\u3092\u4f7f\u3046\u5b9f\u884c\u5f62\u5f0f\u3067\u3001\u4ed6\u306e\u30ce\u30fc\u30c9\u3068\u4e92\u3044\u306b\u901a&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-1683","post","type-post","status-publish","format-standard","hentry","category-ros"],"_links":{"self":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/1683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/comments?post=1683"}],"version-history":[{"count":0,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/posts\/1683\/revisions"}],"wp:attachment":[{"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/media?parent=1683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/categories?post=1683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oohito.com\/nqthm\/wp-json\/wp\/v2\/tags?post=1683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}