{"id":5863,"date":"2020-01-01T18:19:58","date_gmt":"2020-01-01T23:19:58","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=5863"},"modified":"2020-01-01T19:29:26","modified_gmt":"2020-01-02T00:29:26","slug":"setting-up","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=5863","title":{"rendered":"Create 2 With a Pi"},"content":{"rendered":"<p>Scott has a friend who is linking a Pi up to a Create 2 &#8212; using the <a href=\"https:\/\/downloads.ubiquityrobotics.com\/pi.html\" target=\"_blank\" rel=\"noopener noreferrer\">Ubiquity Pi image<\/a>. Unfortunately, it doesn&#8217;t seem to communicate with the robot. Tx but to Rx. There are a few issues in the create_autonomy and libcreate repos that report the same issue and have subsequently merged in a fix. But the Ubiquity image is from June 2019 &#8230; which pre-dates the fix. I&#8217;ve run through the process of installing ROS and create_autonomy on a base Ubuntu. Thought I&#8217;d save the process for later \ud83d\ude42<\/p>\n<p>&nbsp;<\/p>\n<p># Get Ubuntu 16.4 environment to match what Ubiquity Robotics is using &#8230; obviously, this would all be run on the Pi instead<br \/>\ndocker run -dit &#8211;name UbuntuSandbox ubuntu:xenial<\/p>\n<p># Shell into running container<br \/>\ndocker exec -it UbuntuSandbox bash<\/p>\n<p># Update software catalog<br \/>\napt-get update<\/p>\n<p># Install Prerequisities<br \/>\napt-get install python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential cmake git libblkid-dev e2fslibs-dev libboost-all-dev libaudit-dev vim python-pip python-rosdep wget unzip<\/p>\n<p># Create a directory for this project<br \/>\nmkdir \/roomba<br \/>\ncd \/roomba<\/p>\n<p># Install ROS<br \/>\napt-get install lsb-release<br \/>\nsh -c &#8216;echo &#8220;deb http:\/\/packages.ros.org\/ros\/ubuntu $(lsb_release -sc) main&#8221; &gt; \/etc\/apt\/sources.list.d\/ros-latest.list&#8217;<br \/>\napt-key adv &#8211;keyserver hkp:\/\/ha.pool.sks-keyservers.net:80 &#8211;recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654<br \/>\napt-get update<br \/>\napt-get upgrade<br \/>\napt-get install -y python-rosdep python-rosinstall-generator python-wstool python-rosinstall build-essential cmake<br \/>\nmkdir \/roomba\/ros<br \/>\ncd \/roomba\/ros<br \/>\nrosdep init<br \/>\nrosdep update<br \/>\nmkdir -p \/roomba\/ros_catkin_ws<br \/>\ncd \/roomba\/ros_catkin_ws<br \/>\nrosinstall_generator ros_comm &#8211;rosdistro kinetic &#8211;deps &#8211;wet-only &#8211;tar &gt; kinetic-ros_comm-wet.rosinstall<br \/>\nwstool init src kinetic-ros_comm-wet.rosinstall<\/p>\n<p>mkdir -p \/roomba\/ros_catkin_ws\/external_src<br \/>\ncd \/roomba\/ros_catkin_ws\/external_src<br \/>\nwget http:\/\/sourceforge.net\/projects\/assimp\/files\/assimp-3.1\/assimp-3.1.1_no_test_models.zip\/download -O assimp-3.1.1_no_test_models.zip<br \/>\nunzip assimp-3.1.1_no_test_models.zip<br \/>\ncd assimp-3.1.1<br \/>\ncmake .<br \/>\nmake<br \/>\nmake install<\/p>\n<p>cd \/roomba\/ros_catkin_ws<br \/>\nrosdep install -y &#8211;from-paths src &#8211;ignore-src &#8211;rosdistro kinetic -r<\/p>\n<p>.\/src\/catkin\/bin\/catkin_make_isolated &#8211;install -DCMAKE_BUILD_TYPE=Release &#8211;install-space \/opt\/ros\/kinetic<\/p>\n<p># Source in the ROS bash setup stuff<br \/>\nsource \/opt\/ros\/kinetic\/setup.bash<\/p>\n<p># Build libcreate<br \/>\ngit clone https:\/\/github.com\/AutonomyLab\/libcreate.git<br \/>\ncd libcreate<br \/>\nmkdir build<br \/>\ncd build<br \/>\ncmake ..<br \/>\nmake<\/p>\n<p># Build create_autonomy<br \/>\napt-get install python-rosdep python-catkin-tools<br \/>\nmkdir -p \/roomba\/create_ws\/src<br \/>\ncd \/roomba\/create_ws<br \/>\ncatkin init<br \/>\ncd \/roomba\/create_ws\/src<br \/>\ngit clone https:\/\/github.com\/AutonomyLab\/create_autonomy.git<\/p>\n<p>cd \/roomba\/create_ws<br \/>\nrosdep update<br \/>\nrosdep install &#8211;from-paths src -i<\/p>\n<p># Setup so CMake will find our libcreate when we build create_autonomy<br \/>\nmv \/opt\/ros\/kinetic\/lib\/libcreate.so \/opt\/ros\/kinetic\/lib\/libcreate.so.orig<br \/>\ncp \/roomba\/libcreate\/build\/libcreate.so \/opt\/ros\/kinetic\/lib\/libcreate.so<\/p>\n<p># Continue building create_autonomy<br \/>\ncatkin build<\/p>\n<p># Source in the autonomy bash environment<br \/>\nsource \/roomba\/create_ws\/devel\/setup.bash<\/p>\n<p># Create config yaml<br \/>\nvi \/roomba\/config.yaml<br \/>\n## File content:<br \/>\n# Create config YAML<br \/>\n# The device path for the robot<br \/>\ndev: &#8220;\/dev\/ttyUSB0&#8221;<\/p>\n<p># Baud rate. Passing this parameter overwrites the inferred value based on the robot_model<br \/>\nbaud: 115200<\/p>\n<p># Base frame ID<br \/>\nbase_frame: &#8220;base_footprint&#8221;<\/p>\n<p># Odometry frame ID<br \/>\nodom_frame: &#8220;odom&#8221;<\/p>\n<p># Time (s) without receiving a velocity command before stopping the robot<br \/>\nlatch_cmd_duration: 0.2<\/p>\n<p># Internal loop update rate (Hz)<br \/>\nloop_hz: 10.0<\/p>\n<p># Whether to publish the transform between odom_frame and base_frame<br \/>\npublish_tf: true<br \/>\n## End file content<\/p>\n<p># Run it<br \/>\nroslaunch ca_driver create_2.launch config:=\/roomba\/config.yaml desc:=false<\/p>\n<p># Logs at ~\/.ros\/log\/latest<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Scott has a friend who is linking a Pi up to a Create 2 &#8212; using the Ubiquity Pi image. Unfortunately, it doesn&#8217;t seem to communicate with the robot. Tx but to Rx. There are a few issues in the create_autonomy and libcreate repos that report the same issue and have subsequently merged in a &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[881,882,880],"class_list":["post-5863","post","type-post","status-publish","format-standard","hentry","category-technology","tag-create-2","tag-pi","tag-roomba"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5863","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5863"}],"version-history":[{"count":4,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5863\/revisions"}],"predecessor-version":[{"id":5867,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/5863\/revisions\/5867"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5863"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}