{"id":335,"date":"2015-07-13T00:05:17","date_gmt":"2015-07-13T00:05:17","guid":{"rendered":"http:\/\/jafma.net\/ana\/theweekendarchaeologist\/?p=335"},"modified":"2015-07-13T06:32:39","modified_gmt":"2015-07-13T06:32:39","slug":"arduino-ros-indigo-32-on-nootrix-virtual-machine","status":"publish","type":"post","link":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/?p=335","title":{"rendered":"Arduino + ROS Indigo 32 on Nootrix Virtual Machine"},"content":{"rendered":"<a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"http:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F335&#038;t=Arduino%20%2B%20ROS%20Indigo%2032%20on%20Nootrix%20Virtual%20Machine&#038;s=100&#038;p&#091;url&#093;=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F335&#038;p&#091;images&#093;&#091;0&#093;=&#038;p&#091;title&#093;=Arduino%20%2B%20ROS%20Indigo%2032%20on%20Nootrix%20Virtual%20Machine\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/facebook.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F335&#038;text=Check%20this%20out%20%2F%20Mira%20esto\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-reddit nolightbox\" data-provider=\"reddit\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Reddit\" href=\"http:\/\/www.reddit.com\/submit?url=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F335&#038;title=Arduino%20%2B%20ROS%20Indigo%2032%20on%20Nootrix%20Virtual%20Machine\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"reddit\" title=\"Share on Reddit\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/reddit.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-pinterest nolightbox\" data-provider=\"pinterest\" target=\"_blank\" rel=\"nofollow\" title=\"Pin it with Pinterest\" href=\"http:\/\/pinterest.com\/pin\/create\/button\/?url=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F335&#038;media=&#038;description=Arduino%20%2B%20ROS%20Indigo%2032%20on%20Nootrix%20Virtual%20Machine\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"pinterest\" title=\"Pin it with Pinterest\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/pinterest.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"http:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F335&#038;title=Arduino%20%2B%20ROS%20Indigo%2032%20on%20Nootrix%20Virtual%20Machine\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;margin-right:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-16 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=Arduino%20%2B%20ROS%20Indigo%2032%20on%20Nootrix%20Virtual%20Machine&#038;body=Check%20this%20out%20%2F%20Mira%20esto:%20https%3A%2F%2Fjafma.net%2Fana%2Ftheweekendarchaeologist%2Findex.php%3Frest_route%3D%252Fwp%252Fv2%252Fposts%252F335\" style=\"font-size: 0px; width:16px;height:16px;margin:0;margin-bottom:5px;\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"16\" height=\"16\" style=\"display: inline; width:16px;height:16px; margin: 0; padding: 0; border: none; box-shadow: none;\" src=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/32x32\/mail.png\" \/><\/a><p><a id=\"spanish\"><\/a><br \/>\n<a href=\"#english\">[In English]<\/a><br \/>\nROS puede conectarse con un Arduino sin problemas. Mi objetivo es comprobar si esta conexi\u00f3n puede hacerse a trav\u00e9s de la <a href=\"http:\/\/nootrix.com\/downloads\/#RosVM\" target=\"_blank\">m\u00e1quina virtual que proporciona Nootrix<\/a>, ya que es la que utilizo en clase, puesto que facilita el trabajo con m\u00e1quinas Windows, y tambi\u00e9n es m\u00e1s r\u00e1pida y sencilla de instalar para los alumnos.<\/p>\n<p>En mi m\u00e1quina tengo instalado Xubuntu 14.04, uso Virtual Box 4.3.10, y la m\u00e1quina virtual que he instalado es la de\u00a0 ROS Indigo de 32 bits. Una vez que has instalado la m\u00e1quina de ROS en Virtual Box, hay que seguir estos pasos:<\/p>\n<ul>\n<li>Si tu usuario no est\u00e1 en <em>vboxusers<\/em>, a\u00f1\u00e1delo\u00a0 con <em>sudo adduser tu_usuario vboxusers<\/em> (o <em>sudo usermod -aG vboxusers tu_usuario<\/em>).<\/li>\n<li>Arrancar la m\u00e1quina virtual y escoger el Arduino de los dispositivos USB en el men\u00fa <em>Dispositivos<\/em> de Virtual Box.<\/li>\n<li>Seguir las instrucciones de <a href=\"http:\/\/wiki.ros.org\/rosserial_arduino\/Tutorials\/Arduino%20IDE%20Setup\" target=\"_blank\">instalaci\u00f3n de Arduino<\/a> (con <em>catkin<\/em>); hay una peque\u00f1a variaci\u00f3n en la m\u00e1quina Nootrix: el directorio de sketches est\u00e1 en <em>$HOME\/Arduino<\/em>.<\/li>\n<\/ul>\n<p>Una vez instalados los elementos b\u00e1sicos para trabajar con Arduino en ROS, veamos qu\u00e9 hace falta para ejecutar uno de los ejemplos b\u00e1sicos incluidos en la instalaci\u00f3n de Arduino: <em>HelloWorld.ino<\/em>, en el que el Arduino publica en un topic el\u00a0 mensaje &#8220;hello world!&#8221;.<\/p>\n<ul>\n<li>Seguir las <a href=\"http:\/\/wiki.ros.org\/rosserial_arduino\/Tutorials\/Hello%20World\" target=\"_blank\">instrucciones para ejecutar HelloWorld<\/a> (importante: asegurarse que se han escogido las instrucciones para\u00a0 Indigo).<\/li>\n<li>Para averiguar qu\u00e9 dev utilizar: <em>lsusb<\/em>, y luego <em>dmesg | grep tty<\/em>.<\/li>\n<li>Ahora hay que dar permisos a ese dispositivo serie, con <em>cd \/dev\/<\/em> y luego <em>sudo chmod 666 ttyACM0<\/em>.<\/li>\n<li>Despu\u00e9s, pasamos el programa al Arduino, seleccionando bien el puerto.<\/li>\n<li>Abrir un terminal con <em>roscore<\/em>.<\/li>\n<li>Abrir otro terminal con <em>rosrun rosserial_python serial_node.py _port:=\/dev\/ttyACM0<\/em>.<\/li>\n<li>Abrir otro terminal con <em>rostopic echo chatter<\/em> (<em>chatter<\/em> es el nombre del topic usado en el c\u00f3digo .ino de ejemplo)<\/li>\n<li>Aviso: como ROS est\u00e1 usando <em>rosserial<\/em>, el Serial Monitor de Arduino no funciona (al menos con Arduino UNO)<\/li>\n<\/ul>\n<p>El resultado se puede ver en el v\u00eddeo al final del post \ud83d\ude42<\/p>\n<p><a id=\"english\"><\/a><br \/>\n<a href=\"#spanish\">[En espa\u00f1ol]<\/a><\/p>\n<p>ROS can be easily connected to an Arduino board. But I wanted to check if this connection could be done with the <a href=\"http:\/\/nootrix.com\/downloads\/#RosVM\" target=\"_blank\">Nootrix virtual machine<\/a>, the one I use for my classes since it makes easier to work with ROS if you have Windows machines, and it helps the ROS installation for the students.<\/p>\n<p>My machine runs on Xubuntu 14.04, I use Virtual Box 4.3.10, and the virtual machine I have chosen is ROS Indigo 32 bits. Once you have installed the ROS virtual machine on Virtual Box, you should\u00a0 follow these steps:<\/p>\n<ul>\n<li>If your user does not belong to <em>vboxusers<\/em>\u00a0 group, you should add it with <em>sudo adduser your_user vboxusers<\/em> (or <em>sudo usermod -aG vboxusers your_user<\/em>).<\/li>\n<li>Run the virtual machine and choose Arduino from the USB devices listed on the Virtual Box <em>Devices<\/em> menu.<\/li>\n<li>Go to\u00a0 <a href=\"http:\/\/wiki.ros.org\/rosserial_arduino\/Tutorials\/Arduino%20IDE%20Setup\" target=\"_blank\">Arduino installation<\/a> and follow those steps (use <em>catkin<\/em>); there is a sligth modification on the Nootrix machine: the sketches folder is stored in <em>$HOME\/Arduino<\/em>.<\/li>\n<\/ul>\n<p>Now we have all the basic elements to work with Arduino under ROS; let&#8217;s see what else we need to run one of the basic examples included with the Arduino installation: <em>HelloWorld.ino<\/em>, which makes Arduino publish a &#8220;hello world!&#8221; message in a topic.<\/p>\n<ul>\n<li>Follow these <a href=\"http:\/\/wiki.ros.org\/rosserial_arduino\/Tutorials\/Hello%20World\" target=\"_blank\">steps to run\u00a0 HelloWorld<\/a> (it is important to choose the proper instructions, i.e., the Indigo ones).<\/li>\n<li>In order to know which dev to use: <em>lsusb<\/em>, and then <em>dmesg | grep tty<\/em>.<\/li>\n<li>Now you have to grant permissions to that serial device: <em>cd \/dev\/<\/em> and then <em>sudo chmod 666 ttyACM0<\/em>.<\/li>\n<li>Then you upload the program to the Arduino, choosing the right port.<\/li>\n<li>Open a terminal and run <em>roscore<\/em>.<\/li>\n<li>Open another terminal and run <em>rosrun rosserial_python serial_node.py _port:=\/dev\/ttyACM0<\/em>.<\/li>\n<li>Open another terminal and run <em>rostopic echo chatter<\/em> (<em>chatter<\/em> is the name of the topic used in the .ino example code)<\/li>\n<li>Warning: since ROS is using <em>rosserial<\/em>, Arduino&#8217;s Serial Monitor does not work (at least with Arduino UNO)<\/li>\n<\/ul>\n<p>And voil\u00e0, here we have our Arduino publishing in a ROS topic \ud83d\ude42<\/p>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/FtDE2DwjHSA\" width=\"420\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[In English] ROS puede conectarse con un Arduino sin problemas. Mi objetivo es comprobar si esta conexi\u00f3n puede hacerse a trav\u00e9s de la m\u00e1quina virtual que proporciona Nootrix, ya que es la que utilizo en clase, puesto que facilita el trabajo con m\u00e1quinas Windows, y tambi\u00e9n es m\u00e1s r\u00e1pida y sencilla de instalar para los &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/?p=335\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Arduino + ROS Indigo 32 on Nootrix Virtual Machine&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[29,4,10],"tags":[30,41,25],"_links":{"self":[{"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/posts\/335"}],"collection":[{"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=335"}],"version-history":[{"count":11,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/posts\/335\/revisions"}],"predecessor-version":[{"id":357,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=\/wp\/v2\/posts\/335\/revisions\/357"}],"wp:attachment":[{"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jafma.net\/ana\/theweekendarchaeologist\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}