{"id":1329,"date":"2020-10-20T13:58:01","date_gmt":"2020-10-20T04:58:01","guid":{"rendered":"https:\/\/ahnbk.com\/?p=1329"},"modified":"2020-11-19T18:30:51","modified_gmt":"2020-11-19T09:30:51","slug":"ros1%ec%97%90%ec%84%9c-launch-%ed%8c%8c%ec%9d%bc%ec%9d%84-%eb%b6%80%ed%8c%85%ec%8b%9c%ec%97%90-%ec%9e%90%eb%8f%99%ec%9c%bc%eb%a1%9c-%ec%8b%a4%ed%96%89%ed%95%98%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/ahnbk.com\/?p=1329","title":{"rendered":"ROS1\uc5d0\uc11c launch \ud30c\uc77c\uc744 \ubd80\ud305\uc2dc\uc5d0 \uc790\ub3d9\uc73c\ub85c \uc2e4\ud589\ud558\uae30"},"content":{"rendered":"\n<p>\uac1c\ubc1c\uc744 \uc644\ub8cc\ud558\uace0, launch \ud30c\uc77c\uc744 \ubd80\ud305\uc2dc\uc5d0 \uc790\ub3d9\uc73c\ub85c \uc2e4\ud589\ud558\ub3c4\ub85d \ud558\ub824\uba74 systemd \uc11c\ube44\uc2a4\ub97c \uc0ac\uc6a9\ud574\uc57c \ud55c\ub2e4.<\/p>\n\n\n\n<p>\uba3c\uc800 \uc2e4\ud589 \uc2a4\ud06c\ub9bd\ud2b8\ub97c \uc791\uc131\ud55c\ub2e4(\uc2a4\ud06c\ub9bd\ud2b8\uc758 \uc704\uce58\ub294 \uc784\uc758\uc758 \uc704\uce58\uc5ec\ub3c4 \uc0c1\uad00\uc5c6\uc74c)<\/p>\n\n\n\n<p>~\/test.sh<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">#!\/bin\/bash\nsource \/home\/byeongkyu\/.bashrc\nsource \/opt\/ros\/noetic\/setup.bash\nroslaunch roscpp_tutorials talker_listener.launch<\/code><\/pre>\n\n\n\n<p>\ub2e4\uc74c\uc73c\ub85c systemd \uc11c\ube44\uc2a4 \ud30c\uc77c\uc744 \uc0dd\uc131\ud55c\ub2e4. \uc11c\ube44\uc2a4 \ud30c\uc77c\uc758 \uc704\uce58\ub294 \/etc\/systemd\/system \ub0b4\uc5d0 \uc704\uce58\ud55c\ub2e4.<\/p>\n\n\n\n<p>\/etc\/systemd\/system\/bringup_ros.service<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">[Unit]<br>Description=Bringup ROS launch Test<br><br>[Service]<br>ExecStart=\/home\/byeongkyu\/test.sh<br>Restart=on-abort<br><br>[Install]<br>WantedBy=multi-user.target<\/code><\/pre>\n\n\n\n<p>\uc774\uc81c systemd\uc758 \ub370\ubaac\uc744 \uc7ac\uc2dc\uc791\ud574\uc8fc\uace0,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">$ sudo systemctl daemon-reload<\/code><\/pre>\n\n\n\n<p>\uc0dd\uc131\ud55c \uc11c\ube44\uc2a4\ub97c \uc2dc\uc791\ud55c\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">$ sudo systemctl start bringup_ros.service<\/code><\/pre>\n\n\n\n<p>\uc11c\ube44\uc2a4\uc758 \uc0c1\ud0dc\ub97c \ud655\uc778\ud558\uba74,<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">$ sudo systemctl status bringup_ros.service<br>\u25cf bringup_ros.service - Bringup ROS launch Test<br>Loaded: loaded (\/etc\/systemd\/system\/bringup_ros.service; disabled; vendor preset: enabled)<br>Active: active (running) since Tue 2020-10-20 13:55:10 KST; 14s ago<br>Main PID: 35949 (test.sh)<br>Tasks: 26 (limit: 18700)<br>Memory: 57.9M<br>CGroup: \/system.slice\/bringup_ros.service<br>\u251c\u250035949 \/bin\/bash \/home\/byeongkyu\/test.sh<br>\u251c\u250035982 \/usr\/bin\/python3 \/opt\/ros\/noetic\/bin\/roslaunch roscpp_tutorials talker_listener.launch<br>\u251c\u250035990 \/usr\/bin\/python3 \/opt\/ros\/noetic\/bin\/rosmaster --core -p 11311 -w 3 __log:=\/root\/.ros\/log\/6ea0106a-1290-11eb-804a-ffcb70481544\/master.log<br>\u251c\u250036000 \/opt\/ros\/noetic\/lib\/rosout\/rosout __name:=rosout __log:=\/root\/.ros\/log\/6ea0106a-1290-11eb-804a-ffcb70481544\/rosout-1.log<br>\u251c\u250036003 \/opt\/ros\/noetic\/lib\/roscpp_tutorials\/listener __name:=listener __log:=\/root\/.ros\/log\/6ea0106a-1290-11eb-804a-ffcb70481544\/listener-2.log<br>\u2514\u250036005 \/opt\/ros\/noetic\/lib\/roscpp_tutorials\/talker __name:=talker __log:=\/root\/.ros\/log\/6ea0106a-1290-11eb-804a-ffcb70481544\/talker-3.log<br>Oct 20 13:55:23 byeongkyu-XPS-15-7590 test.sh[36003]: [ INFO] [1603169722.778710976]: I heard: [hello world 116]<br>Oct 20 13:55:23 byeongkyu-XPS-15-7590 test.sh[36003]: [ INFO] [1603169722.878691038]: I heard: [hello world 117]<br>Oct 20 13:55:23 byeongkyu-XPS-15-7590 test.sh[36003]: [ INFO] [1603169722.978902069]: I heard: [hello world 118]<\/code><\/pre>\n\n\n\n<p>\uc815\uc0c1\uc801\uc73c\ub85c \uc2e4\ud589\ub418\uace0 \uc788\uc74c\uc744 \ud655\uc778\ud560 \uc218 \uc788\ub2e4.<\/p>\n\n\n\n<p>\uc774\uc81c \ubd80\ud305\uc2dc\uc5d0 \uc2dc\uc791\ud558\ub3c4\ub85d \ud558\ub824\uba74, \uc11c\ube44\uc2a4\ub97c enable \ud574\uc8fc\uba74 \ub05d.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">$ sudo systemctl enable bringup_ros.service<\/code><\/pre>\n\n\n\n<p>\uc774\uc81c \ubd80\ud305\ud560 \ub54c, \uc11c\ube44\uc2a4\uac00 \uc790\ub3d9\uc73c\ub85c \uc2e4\ud589\ub428.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uac1c\ubc1c\uc744 \uc644\ub8cc\ud558\uace0, launch \ud30c\uc77c\uc744 \ubd80\ud305\uc2dc\uc5d0 \uc790\ub3d9\uc73c\ub85c \uc2e4\ud589\ud558\ub3c4\ub85d \ud558\ub824\uba74 systemd \uc11c\ube44\uc2a4\ub97c \uc0ac\uc6a9\ud574\uc57c \ud55c\ub2e4. \uba3c\uc800 \uc2e4\ud589 \uc2a4\ud06c\ub9bd\ud2b8\ub97c \uc791\uc131\ud55c\ub2e4(\uc2a4\ud06c\ub9bd\ud2b8\uc758 \uc704\uce58\ub294 \uc784\uc758\uc758 \uc704\uce58\uc5ec\ub3c4 \uc0c1\uad00\uc5c6\uc74c) ~\/test.sh \ub2e4\uc74c\uc73c\ub85c systemd \uc11c\ube44\uc2a4 \ud30c\uc77c\uc744 \uc0dd\uc131\ud55c\ub2e4. \uc11c\ube44\uc2a4 \ud30c\uc77c\uc758 \uc704\uce58\ub294 \/etc\/systemd\/system \ub0b4\uc5d0 \uc704\uce58\ud55c\ub2e4. \/etc\/systemd\/system\/bringup_ros.service \uc774\uc81c systemd\uc758 \ub370\ubaac\uc744 \uc7ac\uc2dc\uc791\ud574\uc8fc\uace0, \uc0dd\uc131\ud55c \uc11c\ube44\uc2a4\ub97c \uc2dc\uc791\ud55c\ub2e4. \uc11c\ube44\uc2a4\uc758 \uc0c1\ud0dc\ub97c \ud655\uc778\ud558\uba74, \uc815\uc0c1\uc801\uc73c\ub85c \uc2e4\ud589\ub418\uace0 \uc788\uc74c\uc744 \ud655\uc778\ud560 \uc218 \uc788\ub2e4. \uc774\uc81c \ubd80\ud305\uc2dc\uc5d0 \uc2dc\uc791\ud558\ub3c4\ub85d \ud558\ub824\uba74, \uc11c\ube44\uc2a4\ub97c enable &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/ahnbk.com\/?p=1329\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;ROS1\uc5d0\uc11c launch \ud30c\uc77c\uc744 \ubd80\ud305\uc2dc\uc5d0 \uc790\ub3d9\uc73c\ub85c \uc2e4\ud589\ud558\uae30&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false},"categories":[12],"tags":[302,300,301,18],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2wXSW-lr","jetpack-related-posts":[],"jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/ahnbk.com\/index.php?rest_route=\/wp\/v2\/posts\/1329"}],"collection":[{"href":"https:\/\/ahnbk.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahnbk.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahnbk.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ahnbk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1329"}],"version-history":[{"count":2,"href":"https:\/\/ahnbk.com\/index.php?rest_route=\/wp\/v2\/posts\/1329\/revisions"}],"predecessor-version":[{"id":1375,"href":"https:\/\/ahnbk.com\/index.php?rest_route=\/wp\/v2\/posts\/1329\/revisions\/1375"}],"wp:attachment":[{"href":"https:\/\/ahnbk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahnbk.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahnbk.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}