]> pere.pagekite.me Git - homepage.git/blob - blog/tags/robot/robot.rss
a4f52b95b5209d8522e318715133d5cba02992d3
[homepage.git] / blog / tags / robot / robot.rss
1 <?xml version="1.0" encoding="utf-8"?>
2 <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'>
3 <channel>
4 <title>Petter Reinholdtsen - Entries tagged robot</title>
5 <description>Entries tagged robot</description>
6 <link>http://www.hungry.com/~pere/blog/</link>
7
8
9 <item>
10 <title>LinuxCNC MQTT publisher component</title>
11 <link>http://www.hungry.com/~pere/blog/LinuxCNC_MQTT_publisher_component.html</link>
12 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/LinuxCNC_MQTT_publisher_component.html</guid>
13 <pubDate>Sun, 8 Jan 2023 19:30:00 +0100</pubDate>
14 <description>&lt;p&gt;I watched &lt;a href=&quot;https://yewtu.be/watch?v=jmKUV3aNLjk&quot;&gt;a 2015
15 video from Andreas Schiffler&lt;/a&gt; the other day, where he set up
16 &lt;a href=&quot;https://linuxcnc.org/&quot;&gt;LinuxCNC&lt;/a&gt; to send status
17 information to the MQTT broker IBM Bluemix. As I also use MQTT for
18 graphing, it occured to me that a generic MQTT LinuxCNC component
19 would be useful and I set out to implement it. Today I got the first
20 draft limping along and submitted as
21 &lt;a href=&quot;https://github.com/LinuxCNC/linuxcnc/pull/2253&quot;&gt;a patch to the
22 LinuxCNC project&lt;/a&gt;.&lt;/p&gt;
23
24 &lt;p&gt;The simple part was setting up the MQTT publishing code in Python.
25 I already have set up other parts submitting data to my Mosquito MQTT
26 broker, so I could reuse that code. Writing a LinuxCNC component in
27 Python as new to me, but using existing examples in the code
28 repository and the extensive documentation, this was fairly straight
29 forward. The hardest part was creating a automated test for the
30 component to ensure it was working. Testing it in a simulated
31 LinuxCNC machine proved very useful, as I discovered features I needed
32 that I had not thought of yet, and adjusted the code quite a bit to
33 make it easier to test without a operational MQTT broker
34 available.&lt;/p&gt;
35
36 &lt;p&gt;The draft is ready and working, but I am unsure which LinuxCNC HAL
37 pins I should collect and publish by default (in other words, the
38 default set of information pieces published), and how to get the
39 machine name from the LinuxCNC INI file. The latter is a minor
40 detail, but I expect it would be useful in a setup with several
41 machines available. I am hoping for feedback from the experienced
42 LinuxCNC developers and users, to make the component even better
43 before it can go into the mainland LinuxCNC code base.&lt;/p&gt;
44
45 &lt;p&gt;Since I started on the MQTT component, I came across
46 &lt;a href=&quot;https://yewtu.be/watch?v=Bqa2grG0XtA&quot;&gt;another video from Kent
47 VanderVelden&lt;/a&gt; where he combine LinuxCNC with a set of screen glasses
48 controlled by a Raspberry Pi, and it occured to me that it would
49 be useful for such use cases if LinuxCNC also provided a REST API for
50 querying its status. I hope to start on such component once the MQTT
51 component is working well.&lt;/p&gt;
52
53 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
54 activities, please send Bitcoin donations to my address
55 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
56 </description>
57 </item>
58
59 <item>
60 <title>Automatic LinuxCNC servo PID tuning?</title>
61 <link>http://www.hungry.com/~pere/blog/Automatic_LinuxCNC_servo_PID_tuning_.html</link>
62 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Automatic_LinuxCNC_servo_PID_tuning_.html</guid>
63 <pubDate>Sat, 16 Jul 2022 22:30:00 +0200</pubDate>
64 <description>&lt;p&gt;While working on a CNC with servo motors controlled by the
65 &lt;a href=&quot;https://en.wikipedia.org/wiki/LinuxCNC&quot;&gt;LinuxCNC&lt;/a&gt;
66 &lt;a href=&quot;https://en.wikipedia.org/wiki/PID_controller&quot;&gt;PID
67 controller&lt;/a&gt;, I recently had to learn how to tune the collection of values
68 that control such mathematical machinery that a PID controller is. It
69 proved to be a lot harder than I hoped, and I still have not succeeded
70 in getting the Z PID controller to successfully defy gravity, nor X
71 and Y to move accurately and reliably. But while climbing up this
72 rather steep learning curve, I discovered that some motor control
73 systems are able to tune their PID controllers. I got the impression
74 from the documentation that LinuxCNC were not. This proved to be not
75 true.&lt;/p&gt;
76
77 &lt;p&gt;The LinuxCNC
78 &lt;a href=&quot;http://linuxcnc.org/docs/html/man/man9/pid.9.html&quot;&gt;pid
79 component&lt;/a&gt; is the recommended PID controller to use. It uses eight
80 constants &lt;tt&gt;Pgain&lt;/tt&gt;, &lt;tt&gt;Igain&lt;/tt&gt;, &lt;tt&gt;Dgain&lt;/tt&gt;,
81 &lt;tt&gt;bias&lt;/tt&gt;, &lt;tt&gt;FF0&lt;/tt&gt;, &lt;tt&gt;FF1&lt;/tt&gt;, &lt;tt&gt;FF2&lt;/tt&gt; and
82 &lt;tt&gt;FF3&lt;/tt&gt; to calculate the output value based on current and wanted
83 state, and all of these need to have a sensible value for the
84 controller to behave properly. Note, there are even more values
85 involved, theser are just the most important ones. In my case I need
86 the X, Y and Z axes to follow the requested path with little error.
87 This has proved quite a challenge for someone who have never tuned a
88 PID controller before, but there is at least some help to be found.
89
90 &lt;p&gt;I discovered that included in LinuxCNC was this old PID component
91 at_pid claiming to have auto tuning capabilities. Sadly it had been
92 neglected since 2011, and could not be used as a plug in replacement
93 for the default pid component. One would have to rewriting the
94 LinuxCNC HAL setup to test at_pid. This was rather sad, when I wanted
95 to quickly test auto tuning to see if it did a better job than me at
96 figuring out good P, I and D values to use.&lt;/p&gt;
97
98 &lt;p&gt;I decided to have a look if the situation could be improved. This
99 involved trying to understand the code and history of the pid and
100 at_pid components. Apparently they had a common ancestor, as code
101 structure, comments and variable names were quite close to each other.
102 Sadly this was not reflected in the git history, making it hard to
103 figure out what really happened. My guess is that the author of
104 &lt;a href=&quot;https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/at_pid.c&quot;&gt;at_pid.c&lt;/a&gt;
105 took a version of
106 &lt;a href=&quot;https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/pid.c&quot;&gt;pid.c&lt;/a&gt;,
107 rewrote it to follow the structure he wished pid.c to have, then added
108 support for auto tuning and finally got it included into the LinuxCNC
109 repository. The restructuring and lack of early history made it
110 harder to figure out which part of the code were relevant to the auto
111 tuning, and which part of the code needed to be updated to work the
112 same way as the current pid.c implementation. I started by trying to
113 isolate relevant changes in pid.c, and applying them to at_pid.c. My
114 aim was to make sure the at_pid component could replace the pid
115 component with a simple change in the HAL setup loadrt line, without
116 having to &quot;rewire&quot; the rest of the HAL configuration. After a few
117 hours following this approach, I had learned quite a lot about the
118 code structure of both components, while concluding I was heading down
119 the wrong rabbit hole, and should get back to the surface and find a
120 different path.&lt;/p&gt;
121
122 &lt;p&gt;For the second attempt, I decided to throw away all the PID control
123 related part of the original at_pid.c, and instead isolate and lift
124 the auto tuning part of the code and inject it into a copy of pid.c.
125 This ensured compatibility with the current pid component, while
126 adding auto tuning as a run time option. To make it easier to identify
127 the relevant parts in the future, I wrapped all the auto tuning code
128 with &#39;#ifdef AUTO_TUNER&#39;. The end result behave just like the current
129 pid component by default, as that part of the code is identical. The
130 &lt;a href=&quot;https://github.com/LinuxCNC/linuxcnc/pull/1820&quot;&gt;end result
131 entered the LinuxCNC master branch&lt;/a&gt; a few days ago.&lt;/p&gt;
132
133 &lt;p&gt;To enable auto tuning, one need to set a few HAL pins in the PID
134 component. The most important ones are &lt;tt&gt;tune-effort&lt;/tt&gt;,
135 &lt;tt&gt;tune-mode&lt;/tt&gt; and &lt;tt&gt;tune-start&lt;/tt&gt;. But lets take a step
136 back, and see what the auto tuning code will do. I do not know the
137 mathematical foundation of the at_pid algorithm, but from observation
138 I can tell that the algorithm will, when enabled, produce a square
139 wave pattern centered around the &lt;tt&gt;bias&lt;/tt&gt; value on the output pin
140 of the PID controller. This can be seen using the HAL Scope provided
141 by LinuxCNC. In my case, this is translated into voltage (+-10V) sent
142 to the motor controller, which in turn is translated into motor speed.
143 So at_pid will ask the motor to move the axis back and forth. The
144 number of cycles in the pattern is controlled by the
145 &lt;tt&gt;tune-cycles&lt;/tt&gt; pin, and the extremes of the wave pattern is
146 controlled by the &lt;tt&gt;tune-effort&lt;/tt&gt; pin. Of course, trying to
147 change the direction of a physical object instantly (as in going
148 directly from a positive voltage to the equivalent negative voltage)
149 do not change velocity instantly, and it take some time for the object
150 to slow down and move in the opposite direction. This result in a
151 more smooth movement wave form, as the axis in question were vibrating
152 back and forth. When the axis reached the target speed in the
153 opposing direction, the auto tuner change direction again. After
154 several of these changes, the average time delay between the &#39;peaks&#39;
155 and &#39;valleys&#39; of this movement graph is then used to calculate
156 proposed values for Pgain, Igain and Dgain, and insert them into the
157 HAL model to use by the pid controller. The auto tuned settings are
158 not great, but htye work a lot better than the values I had been able
159 to cook up on my own, at least for the horizontal X and Y axis. But I
160 had to use very small &lt;tt&gt;tune-effort&lt;tt&gt; values, as my motor
161 controllers error out if the voltage change too quickly. I&#39;ve been
162 less lucky with the Z axis, which is moving a heavy object up and
163 down, and seem to confuse the algorithm. The Z axis movement became a
164 lot better when I introduced a &lt;tt&gt;bias&lt;/tt&gt; value to counter the
165 gravitational drag, but I will have to work a lot more on the Z axis
166 PID values.&lt;/p&gt;
167
168 &lt;p&gt;Armed with this knowledge, it is time to look at how to do the
169 tuning. Lets say the HAL configuration in question load the PID
170 component for X, Y and Z like this:&lt;/p&gt;
171
172 &lt;blockquote&gt;&lt;pre&gt;
173 loadrt pid names=pid.x,pid.y,pid.z
174 &lt;/pre&gt;&lt;/blockquote&gt;
175
176 &lt;p&gt;Armed with the new and improved at_pid component, the new line will
177 look like this:&lt;/p&gt;
178
179 &lt;blockquote&gt;&lt;pre&gt;
180 loadrt at_pid names=pid.x,pid.y,pid.z
181 &lt;/pre&gt;&lt;/blockquote&gt;
182
183 &lt;p&gt;The rest of the HAL setup can stay the same. This work because the
184 components are referenced by name. If the component had used count=3
185 instead, all use of pid.# had to be changed to at_pid.#.&lt;/p&gt;
186
187 &lt;p&gt;To start tuning the X axis, move the axis to the middle of its
188 range, to make sure it do not hit anything when it start moving back
189 and forth. Next, set the &lt;tt&gt;tune-effort&lt;/tt&gt; to a low number in the
190 output range. I used 0.1 as my initial value. Next, assign 1 to the
191 &lt;tt&gt;tune-mode&lt;/tt&gt; value. Note, this will disable the pid controlling
192 part and feed 0 to the output pin, which in my case initially caused a
193 lot of drift. In my case it proved to be a good idea with X and Y to
194 tune the motor driver to make sure 0 voltage stopped the motor
195 rotation. On the other hand, for the Z axis this proved to be a bad
196 idea, so it will depend on your setup. It might help to set the
197 &lt;tt&gt;bias&lt;/tt&gt; value to a output value that reduce or eliminate the
198 axis drift. Finally, after setting &lt;tt&gt;tune-mode&lt;/tt&gt;, set
199 &lt;tt&gt;tune-start&lt;/tt&gt; to 1 to activate the auto tuning. If all go well,
200 your axis will vibrate for a few seconds and when it is done, new
201 values for Pgain, Igain and Dgain will be active. To test them,
202 change &lt;tt&gt;tune-mode&lt;/tt&gt; back to 0. Note that this might cause the
203 machine to suddenly jerk as it bring the axis back to its commanded
204 position, which it might have drifted away from during tuning. To
205 summarize with some halcmd lines:&lt;/p&gt;
206
207 &lt;blockquote&gt;&lt;pre&gt;
208 setp pid.x.tune-effort 0.1
209 setp pid.x.tune-mode 1
210 setp pid.x.tune-start 1
211 # wait for the tuning to complete
212 setp pid.x.tune-mode 0
213 &lt;/pre&gt;&lt;/blockquote&gt;
214
215 &lt;p&gt;After doing this task quite a few times while trying to figure out
216 how to properly tune the PID controllers on the machine in, I decided
217 to figure out if this process could be automated, and wrote a script
218 to do the entire tuning process from power on. The end result will
219 ensure the machine is powered on and ready to run, home all axis if it
220 is not already done, check that the extra tuning pins are available,
221 move the axis to its mid point, run the auto tuning and re-enable the
222 pid controller when it is done. It can be run several times. Check
223 out the
224 &lt;a href=&quot;https://github.com/SebKuzminsky/MazakVQC1540/blob/bon-dev/scripts/run-auto-pid-tuner&quot;&gt;run-auto-pid-tuner&lt;/a&gt;
225 script on github if you want to learn how it is done.&lt;/p&gt;
226
227 &lt;p&gt;My hope is that this little adventure can inspire someone who know
228 more about motor PID controller tuning can implement even better
229 algorithms for automatic PID tuning in LinuxCNC, making life easier
230 for both me and all the others that want to use LinuxCNC but lack the
231 in depth knowledge needed to tune PID controllers well.&lt;/p&gt;
232
233 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
234 activities, please send Bitcoin donations to my address
235 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
236 </description>
237 </item>
238
239 <item>
240 <title>LinuxCNC translators life just got a bit easier</title>
241 <link>http://www.hungry.com/~pere/blog/LinuxCNC_translators_life_just_got_a_bit_easier.html</link>
242 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/LinuxCNC_translators_life_just_got_a_bit_easier.html</guid>
243 <pubDate>Fri, 3 Jun 2022 21:10:00 +0200</pubDate>
244 <description>&lt;p&gt;Back in oktober last year, when I started looking at the
245 &lt;a href=&quot;https://en.wikipedia.org/wiki/LinuxCNC&quot;&gt;LinuxCNC&lt;/a&gt; system, I
246 proposed to change the documentation build system make life easier for
247 translators. The original system consisted of independently written
248 documentation files for each language, with no automated way to track
249 changes done in other translations and no help for the translators to
250 know how much was left to translated. By using
251 &lt;a href=&quot;https://po4a.org/&quot;&gt;the po4a system&lt;/a&gt; to generate POT and PO
252 files from the English documentation, this can be improved. A small
253 team of LinuxCNC contributors got together and today our labour
254 finally payed off. Since a few hours ago, it is now possible to
255 translate &lt;a href=&quot;https://hosted.weblate.org/projects/linuxcnc/&quot;&gt;the
256 LinuxCNC documentation on Weblate&lt;/a&gt;, alongside the program itself.&lt;/p&gt;
257
258 &lt;p&gt;The effort to migrate the documentation to use po4a has been both
259 slow and frustrating. I am very happy we finally made it.&lt;/p&gt;
260
261 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
262 activities, please send Bitcoin donations to my address
263 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
264 </description>
265 </item>
266
267 <item>
268 <title>Run your industrial metal working machine using Debian?</title>
269 <link>http://www.hungry.com/~pere/blog/Run_your_industrial_metal_working_machine_using_Debian_.html</link>
270 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Run_your_industrial_metal_working_machine_using_Debian_.html</guid>
271 <pubDate>Wed, 2 Mar 2022 18:40:00 +0100</pubDate>
272 <description>&lt;p&gt;After many months of hard work by the good people involved in
273 &lt;a href=&quot;https://en.wikipedia.org/wiki/LinuxCNC&quot;&gt;LinuxCNC&lt;/a&gt;, the
274 system was accepted Sunday
275 &lt;a href=&quot;https://tracker.debian.org/pkg/linuxcnc&quot;&gt;into Debian&lt;/a&gt;.
276 Once it was available from Debian, I was surprised to discover from
277 &lt;a href=&quot;https://qa.debian.org/popcon.php?package=linuxcnc&quot;&gt;its
278 popularity-contest numbers&lt;/a&gt; that people have been reporting its use
279 since 2012. &lt;a href=&quot;http://linuxcnc.org/&quot;&gt;Its project site&lt;/a&gt; might
280 be a good place to check out, but sadly is not working when visiting
281 via Tor.&lt;/p&gt;
282
283 &lt;p&gt;But what is LinuxCNC, you are probably wondering? Perhaps a
284 Wikipedia quote is in place?&lt;/p&gt;
285
286 &lt;blockquote&gt;
287 &quot;LinuxCNC is a software system for numerical control of
288 machines such as milling machines, lathes, plasma cutters, routers,
289 cutting machines, robots and hexapods. It can control up to 9 axes or
290 joints of a CNC machine using G-code (RS-274NGC) as input. It has
291 several GUIs suited to specific kinds of usage (touch screen,
292 interactive development).&quot;
293 &lt;/blockquote&gt;
294
295 &lt;p&gt;It can even control 3D printers. And even though the Wikipedia
296 page indicate that it can only work with hard real time kernel
297 features, it can also work with the user space soft real time features
298 provided by the Debian kernel.
299 &lt;a href=&quot;https://github.com/linuxcnc/linuxcnc&quot;&gt;The source code&lt;/a&gt; is
300 available from Github. The last few months I&#39;ve been involved in the
301 translation setup for the program and documentation. Translators are
302 most welcome to
303 &lt;a href=&quot;https://hosted.weblate.org/engage/linuxcnc/&quot;&gt;join the
304 effort&lt;/a&gt; using Weblate.&lt;/p&gt;
305
306 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
307 activities, please send Bitcoin donations to my address
308 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
309 </description>
310 </item>
311
312 <item>
313 <title>Debian still an excellent choice for Lego builders</title>
314 <link>http://www.hungry.com/~pere/blog/Debian_still_an_excellent_choice_for_Lego_builders.html</link>
315 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Debian_still_an_excellent_choice_for_Lego_builders.html</guid>
316 <pubDate>Sun, 24 Oct 2021 07:10:00 +0200</pubDate>
317 <description>&lt;p&gt;The Debian Lego team saw a lot of activity the last few weeks. All
318 the packages under the team umbrella has been updated to fix
319 packaging, lintian issues and BTS reports. In addition, a new and
320 inspiring team member appeared on both the
321 &lt;a href=&quot;https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-lego-team&quot;&gt;debian-lego-team
322 Team mailing list&lt;/a&gt; and
323 &lt;a href=&quot;irc://irc.debian.org/%23debian-lego&quot;&gt;IRC channel
324 #debian-lego&lt;/a&gt;. If you are interested in Lego CAD design and LEGO
325 Mindstorms programming, check out the
326 &lt;a href=&quot;http://wiki.debian.org/LegoDesigners&quot;&gt;team wiki page&lt;/a&gt; to
327 see what Debian can offer the Lego enthusiast.&lt;/p&gt;
328
329 &lt;p&gt;Patches has been sent upstream, causing new upstream releases, one
330 even the first one in more than ten years, and old upstreams was
331 released with new ones. There are still a lot of work left, and the
332 team welcome more members to help us make sure Debian is the Linux
333 distribution of choice for Lego builders. If you want to contribute,
334 join us in the IRC channel and become part of
335 &lt;a href=&quot;https://salsa.debian.org/debian-lego-team/&quot;&gt;the team on
336 Salsa&lt;/a&gt;.&lt;/p&gt;
337
338 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
339 activities, please send Bitcoin donations to my address
340 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
341 </description>
342 </item>
343
344 <item>
345 <title>The space rover coquine, or how I ended up on the dark side of the moon</title>
346 <link>http://www.hungry.com/~pere/blog/The_space_rover_coquine__or_how_I_ended_up_on_the_dark_side_of_the_moon.html</link>
347 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/The_space_rover_coquine__or_how_I_ended_up_on_the_dark_side_of_the_moon.html</guid>
348 <pubDate>Sun, 2 Jun 2019 23:55:00 +0200</pubDate>
349 <description>&lt;p&gt;A while back a college and friend from Debian and the Skolelinux /
350 Debian Edu project approached me, asking if I knew someone that might
351 be interested in helping out with a technology project he was running
352 as a teacher at &lt;a href=&quot;https://www.ecolefrancodanoise.dk/&quot;&gt;L&#39;école
353 franco-danoise&lt;/a&gt; - the Danish-French school and kindergarden. The
354 kids were building robots, rovers. The story behind it is to build a
355 rover for use
356 &lt;a href=&quot;http://blog.ecolefrancodanoise.dk/first-week-on-the-dark-side&quot;&gt;on
357 the dark side of the moon&lt;/a&gt;, and remote control it. As travel cost
358 was a bit high for the final destination, and they wanted to test the
359 concept first, he was looking for volunteers to host a rover for the
360 kids to control in a foreign country. I ended up volunteering as a
361 host, and last week the rover arrived. It took a while to arrive
362 after &lt;a href=&quot;http://blog.ecolefrancodanoise.dk/model-moms&quot;&gt;it was
363 built and shipped&lt;/a&gt;, because of customs confusion. Luckily we were
364 able fix it quickly with help from my colleges at work.&lt;/p&gt;
365
366 &lt;p&gt;This is what it looked like when the rover arrived. Note the cute
367 eyes looking up on me from the wrapping&lt;/p&gt;
368
369 &lt;img src=&quot;https://people.skolelinux.org/pere/blog/images/2019-06-02-robot-dark-side-of-moon-esken-med-det-rare-i.jpeg&quot; width=&quot;32%&quot; style=&quot;clear:left&quot;/&gt;
370 &lt;img src=&quot;https://people.skolelinux.org/pere/blog/images/2019-06-02-robot-dark-side-of-moon-den-ser-meg.jpeg&quot; width=&quot;32%&quot; style=&quot;clear:left&quot;/&gt;
371 &lt;img src=&quot;https://people.skolelinux.org/pere/blog/images/2019-06-02-robot-dark-side-of-moon-en-skrue-loes.jpeg&quot; width=&quot;32%&quot; style=&quot;clear:left&quot;/&gt;
372
373 &lt;p style=&quot;text-align:left&quot;&gt;Once the robot arrived, we needed to track
374 down batteries and figure out how to build custom firmware for it with
375 the appropriate wifi settings. I asked a friend if I could get two
376 18650 batteries from his pile of Tesla batteries (he had them from the
377 wrack of a crashed Tesla), so now the rover is running on Tesla
378 batteries.&lt;/p&gt;
379
380 &lt;p&gt;Building
381 &lt;a href=&quot;https://gitlab.com/ecolefrancodanoise/arduino-efd/&quot;&gt;the rover
382 firmware&lt;/a&gt; proved a bit harder, as the code did not work out of the
383 box with the Arduino IDE package in Debian Buster. I suspect this is
384 due to a unsolved
385 &lt;a href=&quot;https://github.com/arduino/Arduino/pull/2703&quot;&gt; license problem
386 with arduino&lt;/a&gt; blocking Debian from upgrading to the latest version.
387 In the end we gave up debugging why the IDE failed to find the
388 required libraries, and ended up using the Arduino Makefile from the
389 &lt;a href=&quot;https://tracker.debian.org/pkg/arduino-mk&quot;&gt;arduino-mk Debian
390 package&lt;/a&gt; instead. Unfortunately the camera library is missing from
391 the Arduino environment in Debian, so we disabled the camera support
392 for the first firmware build, to get something up and running. With
393 this reduced firmware, the robot could be controlled via the
394 controller server, driving around and measuring distance using its
395 internal acoustic sensor.&lt;/p&gt;
396
397 &lt;p&gt;Next, With some help from my friend in Denmark, which checked in the
398 camera library into the gitlab repository for me to use, we were able
399 to build a new and more complete version of the firmware, and the
400 robot is now up and running. This is what the &quot;commander&quot; web page
401 look like after taking a measurement and a snapshot:&lt;/p&gt;
402
403 &lt;img src=&quot;https://people.skolelinux.org/pere/blog/images/2019-06-02-robot-dark-side-of-moon-commander.png&quot; width=&quot;40%&quot; border=&quot;1&quot; align=&quot;center&quot;/&gt;
404
405 &lt;p&gt;If you want to learn more about this project, you can check out the
406 &lt;a href=&quot;https://hackaday.io/project/164082-the-dark-side-challenge&quot;&gt;The
407 Dark Side Challenge&lt;/a&gt; Hackaday web pages.&lt;/p&gt;
408
409 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
410 activities, please send Bitcoin donations to my address
411 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
412 </description>
413 </item>
414
415 <item>
416 <title>Debian now got everything you need to program Micro:bit</title>
417 <link>http://www.hungry.com/~pere/blog/Debian_now_got_everything_you_need_to_program_Micro_bit.html</link>
418 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Debian_now_got_everything_you_need_to_program_Micro_bit.html</guid>
419 <pubDate>Tue, 22 Jan 2019 17:20:00 +0100</pubDate>
420 <description>&lt;p&gt;I am amazed and very pleased to discover that since a few days ago,
421 everything you need to program the &lt;a href=&quot;https://microbit.org/&quot;&gt;BBC
422 micro:bit&lt;/a&gt; is available from the Debian archive. All this is
423 thanks to the hard work of Nick Morrott and the Debian python
424 packaging team. The micro:bit project recommend the mu-editor to
425 program the microcomputer, as this editor will take care of all the
426 machinery required to injekt/flash micropython alongside the program
427 into the micro:bit, as long as the pieces are available.&lt;/p&gt;
428
429 &lt;p&gt;There are three main pieces involved. The first to enter Debian
430 was
431 &lt;a href=&quot;https://tracker.debian.org/pkg/python-uflash&quot;&gt;python-uflash&lt;/a&gt;,
432 which was accepted into the archive 2019-01-12. The next one was
433 &lt;a href=&quot;https://tracker.debian.org/pkg/mu-editor&quot;&gt;mu-editor&lt;/a&gt;, which
434 showed up 2019-01-13. The final and hardest part to to into the
435 archive was
436 &lt;a href=&quot;https://tracker.debian.org/pkg/firmware-microbit-micropython&quot;&gt;firmware-microbit-micropython&lt;/a&gt;,
437 which needed to get its build system and dependencies into Debian
438 before it was accepted 2019-01-20. The last one is already in Debian
439 Unstable and should enter Debian Testing / Buster in three days. This
440 all allow any user of the micro:bit to get going by simply running
441 &#39;apt install mu-editor&#39; when using Testing or Unstable, and once
442 Buster is released as stable, all the users of Debian stable will be
443 catered for.&lt;/p&gt;
444
445 &lt;p&gt;As a minor final touch, I added rules to
446 &lt;a href=&quot;https://tracker.debian.org/pkg/isenkram&quot;&gt;the isenkram
447 package&lt;/a&gt; for recognizing micro:bit and recommend the mu-editor
448 package. This make sure any user of the isenkram desktop daemon will
449 get a popup suggesting to install mu-editor then the USB cable from
450 the micro:bit is inserted for the first time.&lt;/p&gt;
451
452 &lt;p&gt;This should make it easier to have fun.&lt;/p&gt;
453
454 &lt;p&gt;As usual, if you use Bitcoin and want to show your support of my
455 activities, please send Bitcoin donations to my address
456 &lt;b&gt;&lt;a href=&quot;bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&quot;&gt;15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&lt;/a&gt;&lt;/b&gt;.&lt;/p&gt;
457 </description>
458 </item>
459
460 <item>
461 <title>My own self balancing Lego Segway</title>
462 <link>http://www.hungry.com/~pere/blog/My_own_self_balancing_Lego_Segway.html</link>
463 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/My_own_self_balancing_Lego_Segway.html</guid>
464 <pubDate>Fri, 4 Nov 2016 10:15:00 +0100</pubDate>
465 <description>&lt;p&gt;A while back I received a Gyro sensor for the NXT
466 &lt;a href=&quot;mindstorms.lego.com&quot;&gt;Mindstorms&lt;/a&gt; controller as a birthday
467 present. It had been on my wishlist for a while, because I wanted to
468 build a Segway like balancing lego robot. I had already built
469 &lt;a href=&quot;http://www.nxtprograms.com/NXT2/segway/&quot;&gt;a simple balancing
470 robot&lt;/a&gt; with the kids, using the light/color sensor included in the
471 NXT kit as the balance sensor, but it was not working very well. It
472 could balance for a while, but was very sensitive to the light
473 condition in the room and the reflective properties of the surface and
474 would fall over after a short while. I wanted something more robust,
475 and had
476 &lt;a href=&quot;https://www.hitechnic.com/cgi-bin/commerce.cgi?preadd=action&amp;key=NGY1044&quot;&gt;the
477 gyro sensor from HiTechnic&lt;/a&gt; I believed would solve it on my
478 wishlist for some years before it suddenly showed up as a gift from my
479 loved ones. :)&lt;/p&gt;
480
481 &lt;p&gt;Unfortunately I have not had time to sit down and play with it
482 since then. But that changed some days ago, when I was searching for
483 lego segway information and came across a recipe from HiTechnic for
484 building
485 &lt;a href=&quot;http://www.hitechnic.com/blog/gyro-sensor/htway/&quot;&gt;the
486 HTWay&lt;/a&gt;, a segway like balancing robot. Build instructions and
487 &lt;a href=&quot;https://www.hitechnic.com/upload/786-HTWayC.nxc&quot;&gt;source
488 code&lt;/a&gt; was included, so it was just a question of putting it all
489 together. And thanks to the great work of many Debian developers, the
490 compiler needed to build the source for the NXT is already included in
491 Debian, so I was read to go in less than an hour. The resulting robot
492 do not look very impressive in its simplicity:&lt;/p&gt;
493
494 &lt;p align=&quot;center&quot;&gt;&lt;img width=&quot;70%&quot; src=&quot;https://people.skolelinux.org/pere/blog/images/2016-11-04-lego-htway-robot.jpeg&quot;&gt;&lt;/p&gt;
495
496 &lt;p&gt;Because I lack the infrared sensor used to control the robot in the
497 design from HiTechnic, I had to comment out the last task
498 (taskControl). I simply placed /* and */ around it get the program
499 working without that sensor present. Now it balances just fine until
500 the battery status run low:&lt;/p&gt;
501
502 &lt;p align=&quot;center&quot;&gt;&lt;video width=&quot;70%&quot; controls=&quot;true&quot;&gt;
503 &lt;source src=&quot;https://people.skolelinux.org/pere/blog/images/2016-11-04-lego-htway-balancing.ogv&quot; type=&quot;video/ogg&quot;&gt;
504 &lt;/video&gt;&lt;/p&gt;
505
506 &lt;p&gt;Now we would like to teach it how to follow a line and take remote
507 control instructions using the included Bluetooth receiver in the NXT.&lt;/p&gt;
508
509 &lt;p&gt;If you, like me, love LEGO and want to make sure we find the tools
510 they need to work with LEGO in Debian and all our derivative
511 distributions like Ubuntu, check out
512 &lt;a href=&quot;http://wiki.debian.org/LegoDesigners&quot;&gt;the LEGO designers
513 project page&lt;/a&gt; and join the Debian LEGO team. Personally I own a
514 RCX and NXT controller (no EV3), and would like to make sure the
515 Debian tools needed to program the systems I own work as they
516 should.&lt;/p&gt;
517 </description>
518 </item>
519
520 <item>
521 <title>All drones should be radio marked with what they do and who they belong to</title>
522 <link>http://www.hungry.com/~pere/blog/All_drones_should_be_radio_marked_with_what_they_do_and_who_they_belong_to.html</link>
523 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/All_drones_should_be_radio_marked_with_what_they_do_and_who_they_belong_to.html</guid>
524 <pubDate>Thu, 21 Nov 2013 15:40:00 +0100</pubDate>
525 <description>&lt;p&gt;Drones, flying robots, are getting more and more popular. The most
526 know ones are the killer drones used by some government to murder
527 people they do not like without giving them the chance of a fair
528 trial, but the technology have many good uses too, from mapping and
529 forest maintenance to photography and search and rescue. I am sure it
530 is just a question of time before &quot;bad drones&quot; are in the hands of
531 private enterprises and not only state criminals but petty criminals
532 too. The drone technology is very useful and very dangerous. To have
533 some control over the use of drones, I agree with Daniel Suarez in his
534 TED talk
535 &quot;&lt;a href=&quot;https://archive.org/details/DanielSuarez_2013G&quot;&gt;The kill
536 decision shouldn&#39;t belong to a robot&lt;/a&gt;&quot;, where he suggested this
537 little gem to keep the good while limiting the bad use of drones:&lt;/p&gt;
538
539 &lt;blockquote&gt;
540
541 &lt;p&gt;Each robot and drone should have a cryptographically signed
542 I.D. burned in at the factory that can be used to track its movement
543 through public spaces. We have license plates on cars, tail numbers on
544 aircraft. This is no different. And every citizen should be able to
545 download an app that shows the population of drones and autonomous
546 vehicles moving through public spaces around them, both right now and
547 historically. And civic leaders should deploy sensors and civic drones
548 to detect rogue drones, and instead of sending killer drones of their
549 own up to shoot them down, they should notify humans to their
550 presence. And in certain very high-security areas, perhaps civic
551 drones would snare them and drag them off to a bomb disposal facility.&lt;/p&gt;
552
553 &lt;p&gt;But notice, this is more an immune system than a weapons system. It
554 would allow us to avail ourselves of the use of autonomous vehicles
555 and drones while still preserving our open, civil society.&lt;/p&gt;
556
557 &lt;/blockquote&gt;
558
559 &lt;p&gt;The key is that &lt;em&gt;every citizen&lt;/em&gt; should be able to read the
560 radio beacons sent from the drones in the area, to be able to check
561 both the government and others use of drones. For such control to be
562 effective, everyone must be able to do it. What should such beacon
563 contain? At least formal owner, purpose, contact information and GPS
564 location. Probably also the origin and target position of the current
565 flight. And perhaps some registration number to be able to look up
566 the drone in a central database tracking their movement. Robots
567 should not have privacy. It is people who need privacy.&lt;/p&gt;
568 </description>
569 </item>
570
571 <item>
572 <title>Perl library to control the Spykee robot moved to github</title>
573 <link>http://www.hungry.com/~pere/blog/Perl_library_to_control_the_Spykee_robot_moved_to_github.html</link>
574 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Perl_library_to_control_the_Spykee_robot_moved_to_github.html</guid>
575 <pubDate>Sat, 19 Oct 2013 10:20:00 +0200</pubDate>
576 <description>&lt;p&gt;Back in 2010, I created a Perl library to talk to
577 &lt;a href=&quot;http://en.wikipedia.org/wiki/Spykee&quot;&gt;the Spykee robot&lt;/a&gt;
578 (with two belts, wifi, USB and Linux) and made it available from my
579 web page. Today I concluded that it should move to a site that is
580 easier to use to cooperate with others, and moved it to github. If
581 you got a Spykee robot, you might want to check out
582 &lt;a href=&quot;https://github.com/petterreinholdtsen/libspykee-perl&quot;&gt;the
583 libspykee-perl github repository&lt;/a&gt;.&lt;/p&gt;
584 </description>
585 </item>
586
587 <item>
588 <title>Debian, the Linux distribution of choice for LEGO designers?</title>
589 <link>http://www.hungry.com/~pere/blog/Debian__the_Linux_distribution_of_choice_for_LEGO_designers_.html</link>
590 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Debian__the_Linux_distribution_of_choice_for_LEGO_designers_.html</guid>
591 <pubDate>Sat, 11 May 2013 20:30:00 +0200</pubDate>
592 <description>&lt;P&gt;In January,
593 &lt;a href=&quot;https://people.skolelinux.org/pere/blog/New_IRC_channel_for_LEGO_designers_using_Debian.html&quot;&gt;I
594 announced a&lt;/a&gt; new &lt;a href=&quot;irc://irc.debian.org/%23debian-lego&quot;&gt;IRC
595 channel #debian-lego&lt;/a&gt;, for those of us in the Debian and Linux
596 community interested in &lt;a href=&quot;http://www.lego.com/&quot;&gt;LEGO&lt;/a&gt;, the
597 marvellous construction system from Denmark. We also created
598 &lt;a href=&quot;http://wiki.debian.org/LegoDesigners&quot;&gt;a wiki page&lt;/a&gt; to have
599 a place to take notes and write down our plans and hopes. And several
600 people showed up to help. I was very happy to see the effect of my
601 call. Since the small start, we have a debtags tag
602 &lt;a href=&quot;http://debtags.debian.net/search/bytag?wl=hardware::hobby:lego&quot;&gt;hardware::hobby:lego&lt;/a&gt;
603 tag for LEGO related packages, and now count 10 packages related to
604 LEGO and &lt;a href=&quot;http://mindstorms.lego.com/&quot;&gt;Mindstorms&lt;/a&gt;:&lt;/p&gt;
605
606 &lt;p&gt;&lt;table&gt;
607 &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://packages.qa.debian.org/brickos&quot;&gt;brickos&lt;/a&gt;&lt;/td&gt;&lt;td&gt;alternative OS for LEGO Mindstorms RCX. Supports development in C/C++&lt;/td&gt;&lt;/tr&gt;
608 &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://packages.qa.debian.org/leocad&quot;&gt;leocad&lt;/a&gt;&lt;/td&gt;&lt;td&gt;virtual brick CAD software&lt;/td&gt;&lt;/tr&gt;
609 &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://packages.qa.debian.org/libnxt&quot;&gt;libnxt&lt;/a&gt;&lt;/td&gt;&lt;td&gt;utility library for talking to the LEGO Mindstorms NX&lt;/td&gt;&lt;/tr&gt;
610 &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://packages.qa.debian.org/lnpd&quot;&gt;lnpd&lt;/a&gt;&lt;/td&gt;&lt;td&gt;daemon for LNP communication with BrickOS&lt;/td&gt;&lt;/tr&gt;
611 &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://packages.qa.debian.org/nbc&quot;&gt;nbc&lt;/a&gt;&lt;/td&gt;&lt;td&gt;compiler for LEGO Mindstorms NXT bricks&lt;/td&gt;&lt;/tr&gt;
612 &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://packages.qa.debian.org/nqc&quot;&gt;nqc&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Not Quite C compiler for LEGO Mindstorms RCX&lt;/td&gt;&lt;/tr&gt;
613 &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://packages.qa.debian.org/python-nxt&quot;&gt;python-nxt&lt;/a&gt;&lt;/td&gt;&lt;td&gt;python driver/interface/wrapper for the Lego Mindstorms NXT robot&lt;/td&gt;&lt;/tr&gt;
614 &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://packages.qa.debian.org/python-nxt-filer&quot;&gt;python-nxt-filer&lt;/a&gt;&lt;/td&gt;&lt;td&gt;simple GUI to manage files on a LEGO Mindstorms NXT&lt;/td&gt;&lt;/tr&gt;
615 &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://packages.qa.debian.org/scratch&quot;&gt;scratch&lt;/a&gt;&lt;/td&gt;&lt;td&gt;easy to use programming environment for ages 8 and up&lt;/td&gt;&lt;/tr&gt;
616 &lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://packages.qa.debian.org/t2n&quot;&gt;t2n&lt;/a&gt;&lt;/td&gt;&lt;td&gt;simple command-line tool for Lego NXT&lt;/td&gt;&lt;/tr&gt;
617 &lt;/table&gt;&lt;/p&gt;
618
619 &lt;p&gt;Some of these are available in Wheezy, and all but one are
620 currently available in Jessie/testing. leocad is so far only
621 available in experimental.&lt;/p&gt;
622
623 &lt;p&gt;If you care about LEGO in Debian, please join us on IRC and help
624 adding the rest of the great free software tools available on Linux
625 for LEGO designers.&lt;/p&gt;
626 </description>
627 </item>
628
629 <item>
630 <title>Moved the pymissile Debian packaging to collab-maint</title>
631 <link>http://www.hungry.com/~pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html</link>
632 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Moved_the_pymissile_Debian_packaging_to_collab_maint.html</guid>
633 <pubDate>Thu, 10 Jan 2013 20:40:00 +0100</pubDate>
634 <description>&lt;p&gt;As part of my investigation on how to improve the support in Debian
635 for hardware dongles, I dug up my old Mark and Spencer USB Rocket
636 Launcher and updated the Debian package
637 &lt;a href=&quot;http://packages.qa.debian.org/pymissile&quot;&gt;pymissile&lt;/a&gt; to make
638 sure udev will fix the device permissions when it is plugged in. I
639 also added a &quot;Modaliases&quot; header to test it in the Debian archive and
640 hopefully make the package be proposed by jockey in Ubuntu when a user
641 plug in his rocket launcher. In the process I moved the source to a
642 git repository under collab-maint, to make it easier for any DD to
643 contribute. &lt;a href=&quot;http://code.google.com/p/pymissile/&quot;&gt;Upstream&lt;/a&gt;
644 is not very active, but the software still work for me even after five
645 years of relative silence. The new git repository is not listed in
646 the uploaded package yet, because I want to test the other changes a
647 bit more before I upload the new version. If you want to check out
648 the new version with a .desktop file included, visit the
649 &lt;a href=&quot;http://anonscm.debian.org/gitweb/?p=collab-maint/pymissile.git&quot;&gt;gitweb
650 view&lt;/a&gt; or use &quot;&lt;tt&gt;git clone
651 git://anonscm.debian.org/collab-maint/pymissile.git&lt;/tt&gt;&quot;.&lt;/p&gt;
652 </description>
653 </item>
654
655 <item>
656 <title>New IRC channel for LEGO designers using Debian</title>
657 <link>http://www.hungry.com/~pere/blog/New_IRC_channel_for_LEGO_designers_using_Debian.html</link>
658 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/New_IRC_channel_for_LEGO_designers_using_Debian.html</guid>
659 <pubDate>Wed, 2 Jan 2013 15:40:00 +0100</pubDate>
660 <description>&lt;p&gt;During Christmas, I have worked a bit on the Debian support for
661 &lt;a href=&quot;http://mindstorms.lego.com/en-us/Default.aspx&quot;&gt;LEGO Mindstorm
662 NXT&lt;/a&gt;. My son and I have played a bit with my NXT set, and I
663 discovered I had to build all the tools myself because none were
664 already in Debian Squeeze. If Debian support for LEGO is something
665 you care about, please join me on the IRC channel
666 &lt;a href=&quot;irc://irc.debian.org/%23debian-lego&quot;&gt;#debian-lego&lt;/a&gt; (server
667 irc.debian.org). There is a lot that could be done to improve the
668 Debian support for LEGO designers. For example both CAD software
669 and Mindstorm compilers are missing. :)&lt;/p&gt;
670
671 &lt;p&gt;Update 2012-01-03: A
672 &lt;a href=&quot;http://wiki.debian.org/LegoDesigners&quot;&gt;project page&lt;/a&gt;
673 including links to Lego related packages is now available.&lt;/p&gt;
674 </description>
675 </item>
676
677 <item>
678 <title>First version of a Perl library to control the Spykee robot</title>
679 <link>http://www.hungry.com/~pere/blog/First_version_of_a_Perl_library_to_control_the_Spykee_robot.html</link>
680 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/First_version_of_a_Perl_library_to_control_the_Spykee_robot.html</guid>
681 <pubDate>Sat, 9 Oct 2010 14:00:00 +0200</pubDate>
682 <description>&lt;p&gt;This summer I got the chance to buy cheap Spykee robots, and since
683 then I have worked on getting Linux software in place to control them.
684 The firmware for the robot is available from the producer, and using
685 that source it was trivial to figure out the protocol specification.
686 I&#39;ve started on a perl library to control it, and made some demo
687 programs using this perl library to allow one to control the
688 robots.&lt;/p&gt;
689
690 &lt;p&gt;The library is quite functional already, and capable of controlling
691 the driving, fetching video, uploading MP3s and play them. There are
692 a few less important features too.&lt;/p&gt;
693
694 &lt;p&gt;Since a few weeks ago, I ran out of time to spend on this project,
695 but I never got around to releasing the current source. I decided
696 today that it was time to do something about it, and uploaded the
697 source to my Debian package store at people.skolelinux.org.&lt;/p&gt;
698
699 &lt;p&gt;Because it was simpler for me, I made a Debian package and
700 published the source and deb. If you got a spykee robot, grab the
701 source or binary package:&lt;/p&gt;
702
703 &lt;p&gt;&lt;ul&gt;
704 &lt;li&gt;&lt;a href=&quot;https://people.skolelinux.org/~pere/debian/packages/lenny/libspykee-perl_0.0.20101009-1.tar.gz&quot;&gt;libspykee-perl_0.0.20101009-1.tar.gz&lt;/a&gt;&lt;/li&gt;
705 &lt;li&gt;&lt;a href=&quot;https://people.skolelinux.org/~pere/debian/packages/lenny/libspykee-perl_0.0.20101009-1.dsc&quot;&gt;libspykee-perl_0.0.20101009-1.dsc&lt;/a&gt;&lt;/li&gt;
706 &lt;li&gt;&lt;a href=&quot;https://people.skolelinux.org/~pere/debian/packages/lenny/libspykee-perl_0.0.20101009-1_all.deb&quot;&gt;libspykee-perl_0.0.20101009-1_all.deb&lt;/a&gt;&lt;/li&gt;
707 &lt;/ul&gt;&lt;/p&gt;
708
709 &lt;p&gt;If you are interested in helping out with developing this library,
710 please let me know.&lt;/p&gt;
711 </description>
712 </item>
713
714 <item>
715 <title>My first perl GUI application - controlling a Spykee robot</title>
716 <link>http://www.hungry.com/~pere/blog/My_first_perl_GUI_application___controlling_a_Spykee_robot.html</link>
717 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/My_first_perl_GUI_application___controlling_a_Spykee_robot.html</guid>
718 <pubDate>Wed, 1 Sep 2010 21:00:00 +0200</pubDate>
719 <description>&lt;p&gt;This evening I made my first Perl GUI application. The last few
720 days I have worked on a Perl module for controlling my recently
721 aquired Spykee robots, and the module is now getting complete enought
722 that it is possible to use it to control the robot driving at least.
723 It was now time to figure out how to use it to create some GUI to
724 allow me to drive the robot around. I picked PerlQt as I have had
725 positive experiences with the Qt API before, and spent a few minutes
726 browsing the web for examples. Using Qt Designer seemed like a short
727 cut, so I ended up writing the perl GUI using Qt Designer and
728 compiling it into a perl program using the puic program from
729 libqt-perl. Nothing fancy yet, but it got buttons to connect and
730 drive around.&lt;/p&gt;
731
732 &lt;p&gt;The perl module I have written provide a object oriented API for
733 controlling the robot. Here is an small example on how to use it:&lt;/p&gt;
734
735 &lt;p&gt;&lt;pre&gt;
736 use Spykee;
737 Spykee::discover(sub {$robot{$_[0]} = $_[1]});
738 my $host = (keys %robot)[0];
739 my $spykee = Spykee-&gt;new();
740 $spykee-&gt;contact($host, &quot;admin&quot;, &quot;admin&quot;);
741 $spykee-&gt;left();
742 sleep 2;
743 $spykee-&gt;right();
744 sleep 2;
745 $spykee-&gt;forward();
746 sleep 2;
747 $spykee-&gt;back();
748 sleep 2;
749 $spykee-&gt;stop();
750 &lt;/pre&gt;&lt;/p&gt;
751
752 &lt;p&gt;Thanks to the release of the source of the robot firmware, I could
753 peek into the implementation at the other end to figure out how to
754 implement the protocol used by the robot. I&#39;ve implemented several of
755 the commands the robot understand, but is still missing the camera
756 support to make it possible to control the robot from remote. First I
757 want to implement support for uploading new firmware and configuring
758 the wireless network, to make it possible to bootstrap a Spykee robot
759 without the producers Windows and MacOSX software (I only have Linux,
760 so I had to ask a friend to come over to get the robot testing
761 going. :).&lt;/p&gt;
762
763 &lt;p&gt;Will release the source to the public soon, but need to figure out
764 where to make it available first. I will add a link to
765 &lt;a href=&quot;http://wiki.nuug.no/grupper/robot/&quot;&gt;the NUUG wiki&lt;/a&gt; for
766 those that want to check back later to find it.&lt;/p&gt;
767 </description>
768 </item>
769
770 <item>
771 <title>Robot, reis deg...</title>
772 <link>http://www.hungry.com/~pere/blog/Robot__reis_deg___.html</link>
773 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/Robot__reis_deg___.html</guid>
774 <pubDate>Sat, 21 Aug 2010 22:10:00 +0200</pubDate>
775 <description>&lt;p&gt;I dag fikk jeg endelig tittet litt på mine nyinnkjøpte roboter, og
776 har brukt noen timer til å google etter interessante referanser og
777 aktuell kildekode for bruk på Linux. Det mest lovende så langt er
778 &lt;a href=&quot;http://ispykee.toyz.org/&quot;&gt;ispykee&lt;/a&gt;, som har en
779 BSD-lisensiert linux-daemon som står som mellomledd mellom roboter på
780 lokalnettet og en sentral tjeneste der en iPhone kan koble seg opp for
781 å fjernstyre roboten. Linux-daemonen implementerer deler av
782 protokollen som roboten forstår. Etter å ha knotet litt med å oppnå
783 kontakt med roboten (den oppretter et eget ad-hoc wifi-nett, så jeg
784 måtte gå av mitt vanlige nett for å få kontakt), og kommet frem til at
785 den lytter på IP-port 9000 og 9001, gikk jeg i gang med å finne ut
786 hvordan jeg kunne snakke med roboten vha. disse portene. Robotbiten
787 av protokollen er publisert av produsenten med GPL-lisens, slik at det
788 er mulig å se hvordan protokollen fungerer. Det finnes en java-klient
789 for Android som så ganske snasen ut, men fant ingen kildekode for
790 denne. Derimot hadde iphone-løsningen kildekode, så jeg tok
791 utgangspunkt i den.&lt;/p&gt;
792
793 &lt;p&gt;Daemonen ville i utgangspunktet forsøke å kontakte den sentrale
794 tjenesten som iphone-programmet kobler seg til. Jeg skrev dette om
795 til i stedet å sette opp en nettverkstjeneste på min lokale maskin,
796 som jeg kan koble meg opp til med telnet og gi kommandoer til roboten
797 (act, forward, right, left, etc). Det involverte i praksis å bytte ut
798 socket()/connect() med socket()/bind()/listen()/accept() for å gjøre
799 klienten om til en tjener.&lt;/p&gt;
800
801 &lt;p&gt;Mens jeg har forsøkt å få roboten til å bevege seg har min samboer
802 skrudd sammen resten av roboten for å få montert kamera og plastpynten
803 (armer, plastfiber for lys). Nå er det hele montert, og roboten er
804 klar til bruk. Må få flyttet den over til mitt vanlige trådløsnett
805 før det blir praktisk, men de bitene av protokollen er ikke
806 implementert i ispykee-daemonen, så der må jeg enten få tak i en mac
807 eller en windows-maskin, eller implementere det selv.&lt;/p&gt;
808
809 &lt;p&gt;Vi var tre som kjøpte slike roboter, og vi har blitt enige om å
810 samle notater og referanser på &lt;a
811 href=&quot;http://wiki.nuug.no/grupper/robot/&quot;&gt;NUUGs wiki&lt;/a&gt;. Ta en titt
812 der hvis du er nysgjerrig.&lt;/p&gt;
813 </description>
814 </item>
815
816 <item>
817 <title>2 Spykee-roboter i hus, nå skal det lekes</title>
818 <link>http://www.hungry.com/~pere/blog/2_Spykee_roboter_i_hus__n__skal_det_lekes.html</link>
819 <guid isPermaLink="true">http://www.hungry.com/~pere/blog/2_Spykee_roboter_i_hus__n__skal_det_lekes.html</guid>
820 <pubDate>Wed, 18 Aug 2010 13:30:00 +0200</pubDate>
821 <description>&lt;p&gt;Jeg kjøpte nettopp to
822 &lt;a href=&quot;http://www.spykee-robot.com/&quot;&gt;Spykee&lt;/a&gt;-roboter, for test og
823 leking. Kjøpte to da det var så billige, og gir meg mulighet til å
824 eksperimentere uten å være veldig redd for å ødelegge alt ved å bytte
825 ut firmware og slikt. Oppdaget at lekebutikken på Bryn senter hadde
826 en liten stabel på lager som de ikke hadde klart å selge ut etter
827 fjorårets juleinnkjøp, og var villig til å selge for en femtedel av
828 vanlig pris. Jeg, Ronny og Jarle har skaffet oss restbeholdningen, og
829 det blir morsomt å se hva vi får ut av dette.&lt;/p&gt;
830
831 &lt;p&gt;Roboten har belter styrt av to motorer, kamera, høytaler, mikrofon
832 og wifi-tilkobling. Det hele styrt av en GPL-lisensiert databoks som
833 jeg mistenker kjører linux. Firmware-kildekoden ble visst publisert i
834 mai. Eneste utfordringen er at kontroller-programvaren kun finnes til
835 Windows, men det må en kunne jobbe seg rundt når vi har kildekoden til
836 firmwaren. :)&lt;/p&gt;
837
838 &lt;ul&gt;
839 &lt;li&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Spykee&quot;&gt;Wikipedia-oppføring&lt;/a&gt;&lt;/li&gt;
840 &lt;li&gt;&lt;a href=&quot;http://www.spykeeworld.com/spykee/US/freeSoftware.html&quot;&gt;Nedlasting av firmware-kilden&lt;/a&gt;&lt;/li&gt;
841 &lt;li&gt;&lt;a href=&quot;http://wiki.nuug.no/grupper/robot&quot;&gt;prosjektwiki hos NUUG&lt;/a&gt;&lt;/li&gt;
842 &lt;/ul&gt;
843 </description>
844 </item>
845
846 </channel>
847 </rss>