{"id":595,"date":"2015-05-08T21:09:55","date_gmt":"2015-05-08T19:09:55","guid":{"rendered":"http:\/\/www.moosth.net\/calabrothers\/?p=595"},"modified":"2015-08-03T20:47:38","modified_gmt":"2015-08-03T18:47:38","slug":"cctronics-when-navio-meets-ros-and-qt5","status":"publish","type":"post","link":"https:\/\/www.moosth.net\/calabrothers\/cctronics-when-navio-meets-ros-and-qt5\/","title":{"rendered":"CCTronics: when Navio+ meets ROS and QT5"},"content":{"rendered":"<h1>Introduction:<\/h1>\n<p>In robotics and industrial application, data sharing and code reuse are important keys of success.<\/p>\n<p>Many efforts have been made by academic researchers to improve\u00a0<a href=\"http:\/\/www.ros.org\/\">Robotic Operating System (ROS)<\/a> functionalities to extend this middleware beyond its\u00a0data sharing capability. The result can be appreciated by all the people who have the patience\u00a0to compile a version and use one or more of the thousands available modules&#8230;\u00a0Within this hell of available hardware\/software platforms, I usually find myself comfortable with classic x86\/arm platforms and modern unix-like<span style=\"line-height: 1.5;\">\u00a0operating system due to robustness and personal experience. Then the practical, but not binding, solution to use Raspberry as low cost platform to develop mobile robotics applications. Here you can appreciate the last version of the <\/span><a style=\"line-height: 1.5;\" href=\"https:\/\/www.raspberrypi.org\/raspberry-pi-2-on-sale\/\">Raspberry Pi 2 B<\/a><span style=\"line-height: 1.5;\"> which includes a fantastic quad-core \ud83d\ude42<\/span><\/p>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_596\" aria-describedby=\"caption-attachment-596\" style=\"width: 590px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/Pi2ModB1GB_-comp.jpeg\"><img fetchpriority=\"high\" decoding=\"async\" data-attachment-id=\"596\" data-permalink=\"https:\/\/www.moosth.net\/calabrothers\/cctronics-when-navio-meets-ros-and-qt5\/pi2modb1gb_-comp\/\" data-orig-file=\"https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/Pi2ModB1GB_-comp.jpeg\" data-orig-size=\"4224,2394\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;22&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;Canon EOS 5D Mark II&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1419934970&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;65&quot;,&quot;iso&quot;:&quot;250&quot;,&quot;shutter_speed&quot;:&quot;1.3&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;1&quot;}\" data-image-title=\"Pi2ModB1GB_-comp\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Raspberry Pi 2&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/Pi2ModB1GB_-comp-1024x580.jpeg\" class=\"size-large wp-image-596\" src=\"http:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/Pi2ModB1GB_-comp-1024x580.jpeg\" alt=\"Raspberry Pi 2\" width=\"590\" height=\"334\" srcset=\"https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/Pi2ModB1GB_-comp-1024x580.jpeg 1024w, https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/Pi2ModB1GB_-comp-300x170.jpeg 300w\" sizes=\"(max-width: 590px) 100vw, 590px\" \/><\/a><figcaption id=\"caption-attachment-596\" class=\"wp-caption-text\">Raspberry Pi 2<\/figcaption><\/figure>\n<p>Another important component of\u00a0a mobile robotic application is the sensor suite. Fortunately,\u00a0<a href=\"http:\/\/www.emlid.com\/\">Emlid<\/a>, an emergent new company, is now providing a fantastic Raspberry shield named Navio+.\u00a0It is a ready-to-go solution for mobile robotics platform since it includes GPS, a complete inertial sensor set (accelerometers and gyroscopes), a barometer and a magnetometer to support aerial navigation and perform AHRS. In addition, to remove the need of any additional extra board, Navio+ includes also a PWM generation for servo motors, PPM acquisition, A\/D converter, I2C, serial line etc&#8230; To be honest, after a unique experience with Arduino and more advanced (low-level) boards, such as FlyMaple, having a full Debian based RT operating system and all the sensor you may need in a single credit card size solution is priceless \ud83d\ude42<\/p>\n<figure id=\"attachment_597\" aria-describedby=\"caption-attachment-597\" style=\"width: 400px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/Navio-B-3D-1-small-400x400.png\"><img decoding=\"async\" data-attachment-id=\"597\" data-permalink=\"https:\/\/www.moosth.net\/calabrothers\/cctronics-when-navio-meets-ros-and-qt5\/navio-b-3d-1-small-400x400\/\" data-orig-file=\"https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/Navio-B-3D-1-small-400x400.png\" data-orig-size=\"400,400\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Navio-B-3D-1-small-400&amp;#215;400\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Navio+&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/Navio-B-3D-1-small-400x400.png\" class=\"size-full wp-image-597\" src=\"http:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/Navio-B-3D-1-small-400x400.png\" alt=\"Navio+\" width=\"400\" height=\"400\" srcset=\"https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/Navio-B-3D-1-small-400x400.png 400w, https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/Navio-B-3D-1-small-400x400-150x150.png 150w, https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/Navio-B-3D-1-small-400x400-300x300.png 300w, https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/Navio-B-3D-1-small-400x400-260x260.png 260w\" sizes=\"(max-width: 400px) 100vw, 400px\" \/><\/a><figcaption id=\"caption-attachment-597\" class=\"wp-caption-text\">Navio+<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>Since Emlid released the basic implementation of <a href=\"https:\/\/github.com\/emlid\/Navio\">Navio+ drivers<\/a>\u00a0and a fantastic <a href=\"http:\/\/community.emlid.com\/t\/raspberry-2-realtime-kernel-image\/112\/72\">kernel image with RT preemption<\/a>,\u00a0I started to implement some C++ functions and some bash scripting to release a ROS oriented image which can provide a basic and important tool to improve development of control and estimation algorithm over the Navio+\/ROS combo. A personal flavor was included by adding QT5 library which I find extremely fascinating an effective.<\/p>\n<h1>SD CCTronics Image:<\/h1>\n<p>The resulting SD image (8Gb), can be <a href=\"https:\/\/mega.co.nz\/#!jZdgUYTa!4Mk-b3fG21gQTTRh2AVV7ArQE1Dew-1ff8wH8qrv_N0\">downloaded here<\/a>.<\/p>\n<h1>C++ CCTronics Firmware:<\/h1>\n<p>The CCTronics firmware includes a binary version of the <a href=\"https:\/\/github.com\/muawijhe\/ccnavio\">ccnavio source code<\/a>\u00a0with the GPS, PWM, the IMU and the Barometer ready to be used via ROS infrastructure. Because of the flexibility of ROS, the solutions are endless, however, to set a simple interface, I implemented an abstraction layer which includes an automatic XML-based module configuration. For example, the mGPS module includes the following <a href=\"https:\/\/github.com\/muawijhe\/ccnavio\/blob\/master\/modules\/mGPS\/ccsettings.xml\">ccsettings.xml<\/a>:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;xml&gt;\r\n     &lt;module id=&quot;mGPS&quot;&gt;\r\n          &lt;periodic&gt;true&lt;\/periodic&gt;\r\n          &lt;frequency&gt;5.0&lt;\/frequency&gt;\r\n          &lt;master&gt;http:\/\/navio:11311&lt;\/master&gt;\r\n          &lt;hostname&gt;navio&lt;\/hostname&gt;\r\n     &lt;\/module&gt;\r\n&lt;\/xml&gt;\r\n<\/pre>\n<p>This XML configuration modifies the <em>mGPS<\/em> module instance of the mGPS class by setting a frequency of 5Hz, a ROS master node with hostname\u00a0<em>navio<\/em> and a module node with hostname <em>navio<\/em>. Changing master and hostname can be useful to set a pre-define modules topology.<\/p>\n<p>Every module is defined by means of header\/source file combo. For example, the\u00a0<a href=\"https:\/\/github.com\/muawijhe\/ccnavio\/blob\/master\/modules\/mGPS\/mgps.h\">mGPS.h header file<\/a>\u00a0defines the basic <em>GPSPacket<\/em> to be delivered\u00a0and the Navio+ drivers object to interface the hardware<\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n#ifndef MGPS_H\r\n#define MGPS_H\r\n\r\n\/*------------------------------------------------------------------------------------------------------*\/\r\n\/**\r\n* \\file: mgps.h\r\n* \\brief GPS Module\r\n*\r\n* \\author: Vincenzo Calabr\u00f2 &lt;vincenzo@calabrothers.com&gt;\r\n*\r\n* \\ingroup CCNAVIODEMO\r\n*\/\r\n\r\n#include &lt;CCLibROS.h&gt;\r\n#include &lt;cc_msgs\/GPSRaw.h&gt;\r\n\r\n#include &lt;Navio\/Ublox.h&gt;\r\n\r\n\/*------------------------------------------------------------------------------------------------------*\/\r\n\/** \\addtogroup CCNAVIODEMO\r\n* @{\r\n*\/\r\n\r\nusing namespace CC::ROS;\r\n\r\nnamespace CC {\r\nnamespace MODULES {\r\n\r\nclass mGPS : public QROSModule\r\n{\r\nprivate:\r\n     typedef cc_msgs::GPSRaw GPSPacket;\r\n     static const qreal m_rDefaultFreq = 5.0;\r\nprotected:\r\n     Ublox m_Device;\r\n     qbool m_DeviceOk;\r\n     GPSPacket m_Packet;\r\n     Publisher m_Publiher;\r\n\r\npublic:\r\n     mGPS();\r\n     mGPS(QString sGPSID);\r\n\r\n     qbool isReady() const;\r\n\r\nprotected:\r\n     void runningCode();\r\n};\r\n}\r\n}\r\n\r\n\/** @}*\/\r\n\r\n#endif \/\/ MGPS_H\r\n<\/pre>\n<p>Finally, the C code will perform subscription or publishing of relevant data via ROS. For example the mGPS module will publish into the topic <em>Navio\/Gps:<\/em><\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\r\n#include &quot;mgps.h&quot;\r\n#include &lt;CCLibMath.h&gt;\r\n\r\nusing namespace CC::MATH;\r\nusing namespace CC::ROS;\r\nusing namespace CC::MODULES;\r\n\r\nmGPS::mGPS() : QROSModule(&quot;mGPS&quot;), m_DeviceOk(false)\r\n{\r\n\u00a0 \u00a0 \u00a0m_Publiher = advertise&lt;GPSPacket&gt;(&quot;Navio\/Gps&quot;);\r\n\u00a0 \u00a0 \u00a0m_DeviceOk = m_Device.testConnection();\r\n\u00a0 \u00a0 \u00a0qDebug() &lt;&lt; &quot;mGPS::mGPS() Module Initialized(&quot; &lt;&lt; m_DeviceOk &lt;&lt; &quot;)&quot;;\r\n\r\n\u00a0 \u00a0 \u00a0if (hasConf() == false) {\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0setFrequency(m_rDefaultFreq);\r\n\u00a0 \u00a0 \u00a0}\r\n}\r\n\r\nqbool mGPS::isReady() const\r\n{\r\n\u00a0 \u00a0 \u00a0return m_DeviceOk;\r\n}\r\n\r\nvoid mGPS::runningCode()\r\n{\r\n\u00a0 \u00a0 \u00a0if (m_DeviceOk == false) {\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0qDebug() &lt;&lt; &quot;mGPS::runningCode() ERROR: Module is not properly initialized&quot;;\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0this-&gt;stop();\r\n\u00a0 \u00a0 \u00a0}\r\n\r\n\u00a0 \u00a0 \u00a0std::vector&lt;double&gt; pos_data;\r\n\r\n\u00a0 \u00a0 \u00a0if (m_Device.decodeSingleMessage(Ublox::NAV_POSLLH, pos_data) == 1)\r\n\u00a0 \u00a0 \u00a0{\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0m_Packet.latitude_deg = pos_data&#x5B;2]\/10000000.0;\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0m_Packet.longitude_deg = pos_data&#x5B;1]\/10000000.0;\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0m_Packet.altitude_m = pos_data&#x5B;3]\/1000.0;\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0m_Packet.gps_time_s.fromSec(pos_data&#x5B;0]\/1000.0);\r\n\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0m_Packet.header.stamp = getTime();\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0m_Packet.header.seq++;\r\n\u00a0 \u00a0 \u00a0}\r\n\r\n\u00a0 \u00a0 \u00a0if (m_Device.decodeSingleMessage(Ublox::NAV_STATUS, pos_data) == 1)\r\n\u00a0 \u00a0 \u00a0{\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0qbool bGpsFix = (((int)pos_data&#x5B;1] &amp; 0x01) &gt; 0);\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0qbool bPublish = false;\r\n\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0switch((int)pos_data&#x5B;0]){\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0case 0x00: \/* no fix *\/\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0case 0x01: \/* dead reckoning only *\/\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0case 0x05: \/* Time only fix *\/;\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0default: \/* Reserved value. Current state unknown *\/\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0break;\r\n\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0case 0x02: \/* 2D-fix *\/\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0case 0x03: \/* 3D-fix *\/\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0case 0x04: \/* GPS + dead reckoning combined *\/\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0bPublish = true;\r\n\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0\u00a0 \u00a0 \u00a0break;\r\n          }\r\n\r\n          if ((bGpsFix == true) &amp;&amp; (bPublish == true)) {\r\n               m_Publiher.publish(m_Packet);\r\n          }\r\n     }\r\n}\r\n\r\n<\/pre>\n<h1>Monitor and Access the CCTronics:<\/h1>\n<p>The following setup is referring to Ubuntu 14.04 LTS release. If you have a different distribution&#8230; well, it&#8217;s your problem \ud83d\ude1b<\/p>\n<p>Once that you downloaded the image,\u00a0you should setup the network as follows:<\/p>\n<h2>1) Add a wifi network to connect to the Ad-Hoc network CCTRONICS:<\/h2>\n<figure id=\"attachment_602\" aria-describedby=\"caption-attachment-602\" style=\"width: 452px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/CALATRONICS_Wifi_1of2.png\"><img decoding=\"async\" data-attachment-id=\"602\" data-permalink=\"https:\/\/www.moosth.net\/calabrothers\/cctronics-when-navio-meets-ros-and-qt5\/calatronics_wifi_1of2\/\" data-orig-file=\"https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/CALATRONICS_Wifi_1of2.png\" data-orig-size=\"452,489\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"CALATRONICS_Wifi_1of2\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Wifi Settings To Access CCTronics &amp;#8211; Ad-Hoc Mode&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/CALATRONICS_Wifi_1of2.png\" class=\"size-full wp-image-602\" src=\"http:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/CALATRONICS_Wifi_1of2.png\" alt=\"Wifi Settings To Access CCTronics - Ad-Hoc Mode\" width=\"452\" height=\"489\" srcset=\"https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/CALATRONICS_Wifi_1of2.png 452w, https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/CALATRONICS_Wifi_1of2-277x300.png 277w\" sizes=\"(max-width: 452px) 100vw, 452px\" \/><\/a><figcaption id=\"caption-attachment-602\" class=\"wp-caption-text\">Wifi Settings To Access CCTronics &#8211; Ad-Hoc Mode<\/figcaption><\/figure>\n<figure id=\"attachment_603\" aria-describedby=\"caption-attachment-603\" style=\"width: 452px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/CALATRONICS_Wifi_2of2.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"603\" data-permalink=\"https:\/\/www.moosth.net\/calabrothers\/cctronics-when-navio-meets-ros-and-qt5\/calatronics_wifi_2of2\/\" data-orig-file=\"https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/CALATRONICS_Wifi_2of2.png\" data-orig-size=\"452,489\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"CALATRONICS_Wifi_2of2\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Wifi Settings to Access CCTronics &amp;#8211; IP Address&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/CALATRONICS_Wifi_2of2.png\" class=\"size-full wp-image-603\" src=\"http:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/CALATRONICS_Wifi_2of2.png\" alt=\"Wifi Settings to Access CCTronics - IP Address\" width=\"452\" height=\"489\" srcset=\"https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/CALATRONICS_Wifi_2of2.png 452w, https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/CALATRONICS_Wifi_2of2-277x300.png 277w\" sizes=\"(max-width: 452px) 100vw, 452px\" \/><\/a><figcaption id=\"caption-attachment-603\" class=\"wp-caption-text\">Wifi Settings to Access CCTronics &#8211; IP Address<\/figcaption><\/figure>\n<h2>2) Add a ethernet connection to share your internet connection:<\/h2>\n<figure id=\"attachment_604\" aria-describedby=\"caption-attachment-604\" style=\"width: 473px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/NAVIO_Connection_ETH.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"604\" data-permalink=\"https:\/\/www.moosth.net\/calabrothers\/cctronics-when-navio-meets-ros-and-qt5\/navio_connection_eth\/\" data-orig-file=\"https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/NAVIO_Connection_ETH.png\" data-orig-size=\"473,489\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"NAVIO_Connection_ETH\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Ethernet Connection to Share internet connection to the Raspberry&lt;\/p&gt;\n\" data-large-file=\"https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/NAVIO_Connection_ETH.png\" class=\"size-full wp-image-604\" src=\"http:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/NAVIO_Connection_ETH.png\" alt=\"Ethernet Connection to Share internet connection to the Raspberry\" width=\"473\" height=\"489\" srcset=\"https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/NAVIO_Connection_ETH.png 473w, https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/NAVIO_Connection_ETH-290x300.png 290w\" sizes=\"(max-width: 473px) 100vw, 473px\" \/><\/a><figcaption id=\"caption-attachment-604\" class=\"wp-caption-text\">Ethernet Connection to Share internet connection to the Raspberry<\/figcaption><\/figure>\n<h2>3)\u00a0Set your \/etc\/hosts<\/h2>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n192.168.1.1 navio_wifi navio\r\n10.42.0.69  navio_eth\r\n<\/pre>\n<h2>4) Access and Manage the CCTronics!<\/h2>\n<p>If you want to update the CCTronics source code (git) or you want to update the Raspbian distribution, add new library or make a mess you can easily connect via ethernet. Just connect the Raspberry to your computer and log into the CCTronics via ssh:<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\r\nssh -lpi navio_eth\u00a0\r\n\r\n<\/pre>\n<p>the password is the default &#8220;<em>raspberry<\/em>&#8221;<\/p>\n<p>If you want to access the raspberry via wifi:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\r\nssh -lpi navio_wifi\u00a0\r\n\r\n<\/pre>\n<p>Wifi can be useful to trace ROS data using CCTronics as master node and a remotely connected instance of rqt as client&#8230;<\/p>\n<h2>4) Building the CCTronics Firmware<\/h2>\n<p>Enter into:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\r\n&gt; cd ~\/Development\/build\r\n\r\n<\/pre>\n<p>Update the custom ROS packets definition and the Makefiles (qmake):<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\r\n&gt; .\/updateROSMessages.sh\r\n&gt; .\/updateMakefile.sh\r\n\r\n<\/pre>\n<p>Build the system&#8230;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\r\n&gt; make\r\n\r\n<\/pre>\n<h2>4)\u00a0RUN CCTronics over ROS<\/h2>\n<pre>Activate the ROS System:\r\n\r\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\r\n&gt; roscore &amp;\r\n\r\nChecking log directory for disk usage. This may take awhile.\r\nPress Ctrl-C to interrupt\r\nDone checking log file disk usage. Usage is &lt;1GB.\r\n\r\nstarted roslaunch server http:\/\/navio:42180\/\r\nros_comm version 1.11.10\r\n\r\nSUMMARY\r\n========\r\n\r\nPARAMETERS\r\n * \/rosdistro: indigo\r\n * \/rosversion: 1.11.10\r\n\r\nNODES\r\n\r\nauto-starting new master\r\nprocess&#x5B;master]: started with pid &#x5B;3834]\r\nROS_MASTER_URI=http:\/\/navio:11311\/\r\n\r\nsetting \/run_id to ddc6874e-f5b3-11e4-8bdc-525400123456\r\nprocess&#x5B;rosout-1]: started with pid &#x5B;3847]\r\nstarted core service &#x5B;\/rosout]\r\n<\/pre>\n<pre>Setting the GPS module to connect to the ROS system:\r\n\r\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n&gt; cd ~\/Development\/build\/modules\/mGPS\r\n&gt; cp ~\/Development\/ccnavio\/modules\/mGPS\/ccsettings.xml .\r\n&gt; .\/mGPS\r\n\r\nXML::Parser::Parser Opening file &quot;ccsettings.xml&quot; ...\r\nXML::Parser::Parser Parsing XML content...\r\nXML::Parser::Parser Getting XML root\r\nXML::Parser::Parser Setting Valid XML\r\nROS::QROSModule::QROSModule XML Config Enable ( true )\r\nROS::QROSModule::QROSModule XML File Content:\r\n&quot;|xml&quot;\r\n&quot;|-module&quot;\r\n&quot;|--periodic&quot;\r\n&quot;|--frequency&quot;\r\n&quot;|--master&quot;\r\n&quot;|--hostname&quot;\r\nROS::QROSModule::QROSModule Module &quot;mGPS&quot; has XML Configuration!\r\nROS::QROSModule::QROSModule Creating new module named &quot;mGPS&quot;\r\nROS::QROSModule::QROSModule Overriding master URL to &quot;http:\/\/navio:11311&quot;\r\nROS::QROSModule::QROSModule Overriding hostname to &quot;navio&quot; \r\n\r\n....\r\n<\/pre>\n<p><span style=\"text-decoration: underline;\"><strong> Enjoy the GPS!! \ud83d\ude42 <\/strong><\/span><\/p>\n<h1>Conclusion:<\/h1>\n<p>I hope you enjoyed this journey into Raspberry Images, C++ code and bash programming \ud83d\ude09 Feel free to contact me for any clarification and suggestion.<\/p>\n<p>Long life to CCTronics: the unique combo of ROS, QT5 and Navio+ with a flavor of module oriented design \ud83d\ude09<\/p>\n<p>&nbsp;<\/p>\n<p>V.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: In robotics and industrial application, data sharing and code reuse are important keys of success. Many efforts have been made by academic researchers to improve\u00a0Robotic Operating System (ROS) functionalities to extend this middleware beyond its\u00a0data sharing capability. The result can be appreciated by all the people who have the patience\u00a0to compile a version and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":597,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[6,2,20],"tags":[24,22,21,23],"class_list":["post-595","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electronics","category-news","category-software","tag-navio","tag-qt5","tag-raspberry","tag-ros"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p3QYke-9B","jetpack_featured_media_url":"https:\/\/www.moosth.net\/calabrothers\/wp-content\/uploads\/2015\/05\/Navio-B-3D-1-small-400x400.png","_links":{"self":[{"href":"https:\/\/www.moosth.net\/calabrothers\/wp-json\/wp\/v2\/posts\/595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.moosth.net\/calabrothers\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.moosth.net\/calabrothers\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.moosth.net\/calabrothers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.moosth.net\/calabrothers\/wp-json\/wp\/v2\/comments?post=595"}],"version-history":[{"count":12,"href":"https:\/\/www.moosth.net\/calabrothers\/wp-json\/wp\/v2\/posts\/595\/revisions"}],"predecessor-version":[{"id":694,"href":"https:\/\/www.moosth.net\/calabrothers\/wp-json\/wp\/v2\/posts\/595\/revisions\/694"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.moosth.net\/calabrothers\/wp-json\/wp\/v2\/media\/597"}],"wp:attachment":[{"href":"https:\/\/www.moosth.net\/calabrothers\/wp-json\/wp\/v2\/media?parent=595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.moosth.net\/calabrothers\/wp-json\/wp\/v2\/categories?post=595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.moosth.net\/calabrothers\/wp-json\/wp\/v2\/tags?post=595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}