<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:754664736;
mso-list-type:hybrid;
mso-list-template-ids:1136004512 -1 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;
mso-fareast-font-family:"Times New Roman";
mso-bidi-font-family:Calibri;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Murray,</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>My 2 cents regarding </p><p class=MsoNormal>“<i>I wonder if anyone on the DPRG mailing list has any experience with the Orange Pi or NanoPi boards they'd like to share</i>”</p><p class=MsoNormal>“…<i>running a multi-threaded Python application on eight cores means you get real multi-threading rather than simulated multi-threading</i>”</p><p class=MsoNormal>“…<i>a subsumption architecture for a robot OS in multi-threaded Python</i>”<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>I think that an easy to use reusable Python-based framework for implementing subsumption could be something that other Python fans would want to see and use. That said, I would not worry too much about multi-threaded vs not and multi-core vs single-core. Instead, your first priority should be the user experience, where the “user” in this context is the Developer, i.e. you and potentially others. What APIs and abstractions should your framework provide, so that your subsumption logic is easier to create, read and debug?<br><br><o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>I only have experience with the Raspberry Pi series of boards and BeagleBone Black. That said, I think they are all equally (ill) suited for robotics. Sure, you get a ton of compute power and memory for very little money, but you usually get almost none of the I/O you need. The BeagleBone Blue is maybe a notable exception, but still only a “nice try” since its built-in DC motor drivers are underpowered and the the A2D inputs only tolerate 1.8V.<br><br><o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>Apart from the lack of built-in rugged I/O, the power consumption of most of these boards is also not that great (maybe less of an issue on larger robots; but definitely an issue for bolting one onto a 3pi which is powered from 4xAAA). <br><br><o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>In addition, the lack of “instant on” – “instant off” is annoying. Yes it is possible to bring boot time on Linux way down, and I have experience in doing this, but you give up a ton of flexibility.<br><br><o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>Of course our hardware should be powerful enough so we don’t get bogged down by having to optimize code all the time, and so that we can afford to run Python and whatever else we need to be productive. But unless you are into ROS, image processing, 360deg spinning Lidar or all of the above at the same time, you won’t be able to really take full advantage of more than 2 cores. <br><br><o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>Do not make your application logic too dependent upon specifics of the underlying hardware platform – in this context: presence or absence of multiple cores. <br><br><o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>Of course you know this already, so just a reminder: Multiple cores and hence multiple threads actually running truly in parallel can get you into trouble quickly if you are not careful. On a single core, any given thread can make the assumption that no other lower-priority thread will “interrupt” the currently running thread. With multiple cores, you can have situations where lower-priority threads access the same data <u>literally at the same time</u>, so more explicit synchronization is needed. <br><br><o:p></o:p></li></ul><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:dprglist@lists.dprg.org">Murray Altheim via DPRGlist</a><br><b>Sent: </b>Monday, October 19, 2020 6:22 AM<br><b>To: </b><a href="mailto:dprglist@lists.dprg.org">dprglist@lists.dprg.org</a><br><b>Subject: </b>[Dprglist] Multi-threading on multi-cores</p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>