{"id":42,"date":"2016-10-24T20:41:47","date_gmt":"2016-10-24T20:41:47","guid":{"rendered":"https:\/\/commons.mtholyoke.edu\/icrl\/?page_id=42"},"modified":"2016-10-24T20:41:47","modified_gmt":"2016-10-24T20:41:47","slug":"how-to-connect-the-turtlebot-to-a-remote-pc","status":"publish","type":"page","link":"https:\/\/commons.mtholyoke.edu\/icrl\/helpful-tools\/how-to-connect-the-turtlebot-to-a-remote-pc\/","title":{"rendered":"How to Connect the Turtlebot to a remote PC"},"content":{"rendered":"<h3 id=\"sites-page-title-header\" align=\"left\"><\/h3>\n<div id=\"sites-canvas-main\" class=\"sites-canvas-main\">\n<div id=\"sites-canvas-main-content\">\n<table class=\"sites-layout-name-one-column sites-layout-hbox\" cellspacing=\"0\">\n<tbody>\n<tr>\n<td class=\"sites-layout-tile sites-tile-name-content-1\">\n<div dir=\"ltr\">\n<div>\n<ul>\n<li>\n<p dir=\"ltr\">Run this command line to check the IP address (it is usually inet addr in the wlan#, i.e. wlan0, section)<\/p>\n<\/li>\n<\/ul>\n<div dir=\"ltr\">\n<table>\n<colgroup>\n<col width=\"567\" \/><\/colgroup>\n<tbody>\n<tr>\n<td>\n<p dir=\"ltr\">ifconfig<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<ul>\n<li>\n<p dir=\"ltr\">Install an ssh server on Turtlebot<\/p>\n<\/li>\n<\/ul>\n<div dir=\"ltr\">\n<table>\n<colgroup>\n<col width=\"567\" \/><\/colgroup>\n<tbody>\n<tr>\n<td>\n<p dir=\"ltr\">sudo apt-get install openssh-server<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>**Make Sure the turtlebot and the remote laptop are on the same wifi**<\/p>\n<\/div>\n<div>\n<ul>\n<li>\n<p dir=\"ltr\">Confirm that you can ssh to Turtlebot from the remote PC. Replace turtle in the command above with the username you created when installing the turtlebot software, and replace &lt;TURTLEBOT_IP&gt; with the hostname or IP address of Turtlebot.<\/p>\n<\/li>\n<\/ul>\n<div dir=\"ltr\">\n<table>\n<colgroup>\n<col width=\"567\" \/><\/colgroup>\n<tbody>\n<tr>\n<td>\n<p dir=\"ltr\">ssh turtle@&lt;TURTLEBOTP_IP&gt;<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<ul>\n<li>\n<p dir=\"ltr\">Run these commands on Turtlebot<\/p>\n<\/li>\n<\/ul>\n<div dir=\"ltr\">\n<table>\n<colgroup>\n<col width=\"568\" \/><\/colgroup>\n<tbody>\n<tr>\n<td>\n<p dir=\"ltr\">echo export ROS_MASTER_URI=http:\/\/IP_OF_TURTLEBOT:11311 &gt;&gt; ~\/.bashrc<\/p>\n<p dir=\"ltr\">echo export ROS_HOSTNAME=IP_OF_TURTLEBOT &gt;&gt; ~\/.bashrc<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<ul>\n<li>\n<p dir=\"ltr\">Then, source the .bashrc file and run roscore on Turtlebot:<\/p>\n<\/li>\n<\/ul>\n<div dir=\"ltr\">\n<table>\n<colgroup>\n<col width=\"567\" \/><\/colgroup>\n<tbody>\n<tr>\n<td>\n<p dir=\"ltr\">source .bashrc<\/p>\n<p dir=\"ltr\">roscore<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p dir=\"ltr\">*NOTE: Source the .bashrc in each terminal, before you try to run any launch file. Always run \u201croscore\u201d on the turtlebot laptop.<\/p>\n<ul>\n<li>\n<p dir=\"ltr\">Then launch the turtlebot (on\/off button) and relaunch if it is already launched:<\/p>\n<\/li>\n<\/ul>\n<div dir=\"ltr\">\n<table>\n<colgroup>\n<col width=\"567\" \/><\/colgroup>\n<tbody>\n<tr>\n<td>\n<p dir=\"ltr\">roslaunch turtlebot_bringup minimal.launch<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<ul>\n<li>\n<p dir=\"ltr\">Run these two commands on the remote PC<\/p>\n<\/li>\n<\/ul>\n<div dir=\"ltr\">\n<table>\n<colgroup>\n<col width=\"566\" \/><\/colgroup>\n<tbody>\n<tr>\n<td>\n<p dir=\"ltr\">echo export ROS_MASTER_URI=http:\/\/IP_OF_TURTLEBOT:11311 &gt;&gt; ~\/.bashrc<\/p>\n<p dir=\"ltr\">echo export ROS_HOSTNAME=IP_OF_PC &gt;&gt; ~\/.bashrc<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<ul>\n<li>\n<p dir=\"ltr\">Then, launch the keyboard control on the remote PC:<\/p>\n<\/li>\n<\/ul>\n<div dir=\"ltr\">\n<table>\n<colgroup>\n<col width=\"565\" \/><\/colgroup>\n<tbody>\n<tr>\n<td>\n<p dir=\"ltr\">roslaunch turtlebot_teleop keyboard_teleop.launch<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<ul>\n<li>Press the keys listed in the terminal and move the turtlebot around.<\/li>\n<\/ul>\n<div><\/div>\n<p>Note: Most of the commands run successfully in the remote PC\/laptop after ssh-ing into the Turtlebot. However, Rviz should be run in a different terminal (not in the ssh-ed terminal).<\/p><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Run this command line to check the IP address (it is usually inet addr in the wlan#, i.e. wlan0, section) ifconfig Install an ssh server on Turtlebot sudo apt-get install openssh-server **Make Sure the turtlebot and the remote laptop are on the same wifi** Confirm that you can ssh to Turtlebot from the remote PC. &hellip; <a href=\"https:\/\/commons.mtholyoke.edu\/icrl\/helpful-tools\/how-to-connect-the-turtlebot-to-a-remote-pc\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">How to Connect the Turtlebot to a remote PC<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":177,"featured_media":0,"parent":33,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"class_list":["post-42","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/commons.mtholyoke.edu\/icrl\/wp-json\/wp\/v2\/pages\/42","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/commons.mtholyoke.edu\/icrl\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/commons.mtholyoke.edu\/icrl\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/commons.mtholyoke.edu\/icrl\/wp-json\/wp\/v2\/users\/177"}],"replies":[{"embeddable":true,"href":"https:\/\/commons.mtholyoke.edu\/icrl\/wp-json\/wp\/v2\/comments?post=42"}],"version-history":[{"count":1,"href":"https:\/\/commons.mtholyoke.edu\/icrl\/wp-json\/wp\/v2\/pages\/42\/revisions"}],"predecessor-version":[{"id":43,"href":"https:\/\/commons.mtholyoke.edu\/icrl\/wp-json\/wp\/v2\/pages\/42\/revisions\/43"}],"up":[{"embeddable":true,"href":"https:\/\/commons.mtholyoke.edu\/icrl\/wp-json\/wp\/v2\/pages\/33"}],"wp:attachment":[{"href":"https:\/\/commons.mtholyoke.edu\/icrl\/wp-json\/wp\/v2\/media?parent=42"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}