{"id":578,"date":"2012-07-05T21:58:52","date_gmt":"2012-07-05T19:58:52","guid":{"rendered":"http:\/\/blog.ulrichard.ch\/?p=578"},"modified":"2012-07-05T21:58:52","modified_gmt":"2012-07-05T19:58:52","slug":"installing-ros-on-a-bifferboard","status":"publish","type":"post","link":"https:\/\/ulrichard.ch\/blog\/?p=578","title":{"rendered":"installing ros on a bifferboard"},"content":{"rendered":"<p>I wanted the robot arm to be a bit autonomous from the computer, and I thought the bifferboard should be powerful enough to drive it. So I wanted to install ROS onto it. My bifferboard runs debian squeeze, and that means it&#8217;s not just a matter of installing the packages as with ubuntu. There is a dedicated wiki page about installing ROS on debian, so I was of the opinion that it can&#8217;t be that hard.\u00c2\u00a0 Actually, I once tried to install ros electric already when the bifferboard was still running debian lenny, and I ran into an infinite loop. I was full of hope that this bug had been fixed now with the release of debian squeeze and ros fuerte. But in fact, the first infinite loop was even earlier this time. And after circumventing an issue in pip with the <a href=\"https:\/\/github.com\/pypa\/pip\/issues\/588\" target=\"_blank\" rel=\"noopener\">help of a pip dev<\/a>, I ran into the one I experienced earlier. I was able to find a workaround this time and <a href=\"http:\/\/pyyaml.org\/ticket\/253\">reported the issue to pyyaml<\/a>. The <a href=\"https:\/\/sites.google.com\/site\/bifferboard\/Home\/howto\/qemu\" target=\"_blank\" rel=\"noopener\">bifferboard has no FPU<\/a>, and from what I can observe in python no inf and strange handling of nan. <!--more--><\/p>\n<p>Finally, I got to the compilation step. It uses cmake: nice! First I started the build as suggested with <strong>make -j8<\/strong> but the tiny little board was so overwhelmed, that I couldn&#8217;t even ssh in any more. Issuing <strong>make -j1<\/strong> was much better, this way instead of 8 parallel jobs, only one job would be executed at a time. Still it got hot, the flash stick blinked like crazy, and the device was compiling for a day. At about 15% progress it hit a compiler error. I thought about adding more swap space, but then decided to compile the stuff on a computer. To have it authentic, I followed the <a href=\"https:\/\/sites.google.com\/site\/bifferboard\/Home\/howto\/qemu\">description with the tailored qemu<\/a>, but I got a strange error when trying to power up the emulator. So I booted an old squeeze 32bit virtual box. Even the virtual machine was a looooooooooot faster than the bifferboard at installing and compiling. What seemed to take a week on the bifferboard was a matter of 15 minutes at max in the VM. So I just copied the folder \/opt\/ros from the VM to the bifferboard, and prepared ~\/.bashrc so that all the stuff could be found. Then I checked out my <a href=\"https:\/\/github.com\/ulrichard\/robotloader\/\" target=\"_blank\" rel=\"noopener\">robotloader<\/a> project which only needs to run python.<\/p>\n<p>Running roscore on the board was less pleasant again. Usually I was greeted with three screens full of error messages and only occasionally did it work. The errors were amongst the following, but each time different. The one thing that always appeared at the end was <strong>KeyboardInterrupt<\/strong>, as if I pressed ctrl-c which I didn&#8217;t.<\/p>\n<pre class=\"brush: bash; gutter: false; first-line: 1\">bifferboard:~\/# roscore &amp;\n[1] 1742\nbifferboard:~\/# ... logging to \/root\/.ros\/log\/cc5b871a-c6d2-11e1-ba29-6ab3f60006b9\/roslaunch-bifferboard.localdomain-1742.log\nChecking log directory for disk usage. This may take awhile.\nPress Ctrl-C to interrupt\nDone checking log file disk usage. Usage is &lt;1GB.\n\nstarted roslaunch server http:\/\/bifferboard.localdomain:46404\/\nros_comm version 1.8.9\n\nSUMMARY\n========\n\nPARAMETERS\n * \/rosdistro\n * \/rosversion\n\nNODES\n\nauto-starting new master\nprocess[master]: started with pid [1757]\nERROR: could not contact master [http:\/\/bifferboard.localdomain:11311\/]\n[master] killing on exit\nTraceback (most recent call last):\n  File \"\/opt\/ros\/fuerte\/bin\/rosmaster\", line 5, in &lt;module&gt;\n    pkg_resources.run_script('ros-comm==1.8.12', 'rosmaster')\n  File \"\/usr\/lib\/python2.6\/dist-packages\/pkg_resources.py\", line 467, in run_script\n    self.require(requires)[0].run_script(script_name, ns)\n  File \"\/usr\/lib\/python2.6\/dist-packages\/pkg_resources.py\", line 1200, in run_script\n    execfile(script_filename, namespace, namespace)\n  File \"\/opt\/ros\/fuerte\/lib\/python2.6\/dist-packages\/ros_comm-1.8.12-py2.6.egg\/EGG-INFO\/scripts\/rosmaster\", line 34, in &lt;module&gt;\n    import rosmaster\n  File \"\/opt\/ros\/fuerte\/lib\/python2.6\/dist-packages\/ros_comm-1.8.12-py2.6.egg\/rosmaster\/__init__.py\", line 35, in &lt;module&gt;\n    from .main import rosmaster_main\n  File \"\/opt\/ros\/fuerte\/lib\/python2.6\/dist-packages\/ros_comm-1.8.12-py2.6.egg\/rosmaster\/main.py\", line 43, in &lt;module&gt;\n    import rosmaster.master\n  File \"\/opt\/ros\/fuerte\/lib\/python2.6\/dist-packages\/ros_comm-1.8.12-py2.6.egg\/rosmaster\/master.py\", line 47, in &lt;module&gt;\n    import rosmaster.master_api\n  File \"\/opt\/ros\/fuerte\/lib\/python2.6\/dist-packages\/ros_comm-1.8.12-py2.6.egg\/rosmaster\/master_api.py\", line 72, in &lt;module&gt;\n    from rosmaster.validators import non_empty, non_empty_str, not_none, is_api, is_topic, is_service, valid_type_name, valid_name, empty_or_valid_name, ParameterInvalid\n  File \"\/opt\/ros\/fuerte\/lib\/python2.6\/dist-packages\/ros_comm-1.8.12-py2.6.egg\/rosmaster\/validators.py\", line 35, in &lt;module&gt;\n    \"\"\"Internal-use Python decorators for parameter validation\"\"\"\nKeyboardInterrupt\nUnhandled exception in thread started by\nError in sys.excepthook:\n\nOriginal exception was:<\/pre>\n<p>And the following was proof that the above were not just warnings:<\/p>\n<pre class=\"brush: bash; gutter: false; first-line: 1\">bifferboard:~# rosnode list\nERROR: Unable to communicate with master!<\/pre>\n<p>So, my best guess is that it&#8217;s a timing issue where my device is just too slow at booting roscore and rosmaster. I&#8217;ll have to check if there are any parameters, I need to adjust.<\/p>\n<p>But today my <a href=\"http:\/\/www.raspberrypi.org\/\">raspberry pi<\/a> finally arrived, so <a href=\"http:\/\/blog.ulrichard.ch\/?p=601\" target=\"_blank\" rel=\"noopener\">I will see<\/a> if that is better suited for the task.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wanted the robot arm to be a bit autonomous from the computer, and I thought the bifferboard should be powerful enough to drive it. So I wanted to install ROS onto it. My bifferboard runs debian squeeze, and that means it&#8217;s not just a matter of installing the packages as with ubuntu. There is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7,1],"tags":[34,68,187,188,190],"class_list":["post-578","post","type-post","status-publish","format-standard","hentry","category-projects","category-software","category-uncategorized","tag-bifferboard","tag-debian","tag-robot-arm","tag-robotics","tag-ros"],"_links":{"self":[{"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=578"}],"version-history":[{"count":0,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=\/wp\/v2\/posts\/578\/revisions"}],"wp:attachment":[{"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ulrichard.ch\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}