<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Robot2 &#8211; an ARM based colour tracking robot</title>
	<atom:link href="http://negativeacknowledge.com/2009/05/robot2-an-arm-based-colour-tracking-robot/feed/" rel="self" type="application/rss+xml" />
	<link>http://negativeacknowledge.com/2009/05/robot2-an-arm-based-colour-tracking-robot/</link>
	<description></description>
	<lastBuildDate>Fri, 30 Mar 2012 17:45:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: ZoneMikel</title>
		<link>http://negativeacknowledge.com/2009/05/robot2-an-arm-based-colour-tracking-robot/comment-page-1/#comment-440</link>
		<dc:creator>ZoneMikel</dc:creator>
		<pubDate>Fri, 30 Mar 2012 17:45:04 +0000</pubDate>
		<guid isPermaLink="false">http://negativeacknowledge.com/?p=51#comment-440</guid>
		<description>Thanks Adam,
  I&#039;m currently building something similar and your example will really help. my site is down (as usual) but if your still into this stuff you can email me ! U can search for zonemikel on youtube to see my stuff. 

Very nice work on your project!</description>
		<content:encoded><![CDATA[<p>Thanks Adam,<br />
  I&#8217;m currently building something similar and your example will really help. my site is down (as usual) but if your still into this stuff you can email me ! U can search for zonemikel on youtube to see my stuff. </p>
<p>Very nice work on your project!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rocky</title>
		<link>http://negativeacknowledge.com/2009/05/robot2-an-arm-based-colour-tracking-robot/comment-page-1/#comment-435</link>
		<dc:creator>Rocky</dc:creator>
		<pubDate>Thu, 16 Feb 2012 14:13:54 +0000</pubDate>
		<guid isPermaLink="false">http://negativeacknowledge.com/?p=51#comment-435</guid>
		<description>ok Thanx a lot.....1 more thing....if i need to display the image directly to oled as u did....not only red or green but the whole image as u did previously.....is it possible to get it through ur code...??</description>
		<content:encoded><![CDATA[<p>ok Thanx a lot&#8230;..1 more thing&#8230;.if i need to display the image directly to oled as u did&#8230;.not only red or green but the whole image as u did previously&#8230;..is it possible to get it through ur code&#8230;??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Random</title>
		<link>http://negativeacknowledge.com/2009/05/robot2-an-arm-based-colour-tracking-robot/comment-page-1/#comment-434</link>
		<dc:creator>Random</dc:creator>
		<pubDate>Thu, 16 Feb 2012 12:48:18 +0000</pubDate>
		<guid isPermaLink="false">http://negativeacknowledge.com/?p=51#comment-434</guid>
		<description>I think you might struggle to get the image, but if you can set up the SD card to stream data over SPI then a lot of my code (mostly in main.c and camera.c) should be helpful. I&#039;d suggest you need to read the data into RAM one line at a time, then set up a DMA transfer to shove that line out to the memory card once it has been read. It won&#039;t be easy, though -- the F100s have even lower clock speeds.</description>
		<content:encoded><![CDATA[<p>I think you might struggle to get the image, but if you can set up the SD card to stream data over SPI then a lot of my code (mostly in main.c and camera.c) should be helpful. I&#8217;d suggest you need to read the data into RAM one line at a time, then set up a DMA transfer to shove that line out to the memory card once it has been read. It won&#8217;t be easy, though &#8212; the F100s have even lower clock speeds.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rocky</title>
		<link>http://negativeacknowledge.com/2009/05/robot2-an-arm-based-colour-tracking-robot/comment-page-1/#comment-433</link>
		<dc:creator>Rocky</dc:creator>
		<pubDate>Thu, 16 Feb 2012 11:29:27 +0000</pubDate>
		<guid isPermaLink="false">http://negativeacknowledge.com/?p=51#comment-433</guid>
		<description>Hi,i m interfacing a 5.17 mega pixel camera with stm32f100....using i2c....i just need to take a pic &amp; store it in memory card.....can you pls helpme out what part of ur code would help me...Thanx</description>
		<content:encoded><![CDATA[<p>Hi,i m interfacing a 5.17 mega pixel camera with stm32f100&#8230;.using i2c&#8230;.i just need to take a pic &amp; store it in memory card&#8230;..can you pls helpme out what part of ur code would help me&#8230;Thanx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Random</title>
		<link>http://negativeacknowledge.com/2009/05/robot2-an-arm-based-colour-tracking-robot/comment-page-1/#comment-428</link>
		<dc:creator>Random</dc:creator>
		<pubDate>Wed, 28 Dec 2011 13:18:06 +0000</pubDate>
		<guid isPermaLink="false">http://negativeacknowledge.com/?p=51#comment-428</guid>
		<description>If your CPU approach is working out, and it seems like it is, I&#039;d stick with it.

It sounds like you&#039;ve really got it all under control! Your project sounds really impressive, I can&#039;t wait to hear how it turns out. Doing proper SLAM with a line laser would be incredibly cool (basically LIDAR) and in theory can get you great results for indoor maps. Getting something basic working for stabalisation will probably suffice, especially for indoor flying or such. That&#039;s a really ambitious A2 project you&#039;ve got going! I bet Mr P&#039;s loving it. Good luck again!</description>
		<content:encoded><![CDATA[<p>If your CPU approach is working out, and it seems like it is, I&#8217;d stick with it.</p>
<p>It sounds like you&#8217;ve really got it all under control! Your project sounds really impressive, I can&#8217;t wait to hear how it turns out. Doing proper SLAM with a line laser would be incredibly cool (basically LIDAR) and in theory can get you great results for indoor maps. Getting something basic working for stabalisation will probably suffice, especially for indoor flying or such. That&#8217;s a really ambitious A2 project you&#8217;ve got going! I bet Mr P&#8217;s loving it. Good luck again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt B</title>
		<link>http://negativeacknowledge.com/2009/05/robot2-an-arm-based-colour-tracking-robot/comment-page-1/#comment-427</link>
		<dc:creator>Matt B</dc:creator>
		<pubDate>Wed, 28 Dec 2011 02:50:40 +0000</pubDate>
		<guid isPermaLink="false">http://negativeacknowledge.com/?p=51#comment-427</guid>
		<description>I have not tried a &#039;scope because I don&#039;t have one! I&#039;ll try it at school. It may be that there is quite a lot of capacitance because I used a jumper on that line on the PCB, which wasn&#039;t the greatest of ideas... But if the camera works at 6MHz, that doubles the processing time so I&#039;m not complaining, and 15 FPS is good enough.

I&#039;m writing everything in assembler at the moment. I have tried to find actual information about the cortex m3&#039;s caches, but I really don&#039;t know where to look. I find the SYSTICK timer useful for cycle-counting - but a reasonable amount of it is just guessing.

Unfortunately I cannot just poll the pixel clock line because each poll loop takes at minimum 8 or 9 cycles, which is not fast enough. My approach is to synchronise with the pixel clock line, so that my inline assembler will read each pixel at the centre of the PIXCLK waveform. The synchronisation will occur once before each line. I&#039;m pretty sure that the pixel reading code will take consistently the same amount of time, because I tested it billions of times.

I did not know that interrupts were that responsive on the cortex m3, but using them would still reduce the FPS by a lot. Perhaps I will try them if I can&#039;t get this CPU approach to work.

It is not just one point - it is a line laser pulsed at the exposure time of the camera, and I was thinking more for inside the house - navigating and building maps of walls etc, not a height map (ultrasonic sensors will probably be used for landing/ceiling awareness). But that will be next year! 

I have found 3, 3 axis sensors (acc, gyro and magneto), and will probably just try making up some simple stuff to start with (complimentary filters and things) and just improve on that, a PID loop would also be used.

Thanks for your suggestions!</description>
		<content:encoded><![CDATA[<p>I have not tried a &#8216;scope because I don&#8217;t have one! I&#8217;ll try it at school. It may be that there is quite a lot of capacitance because I used a jumper on that line on the PCB, which wasn&#8217;t the greatest of ideas&#8230; But if the camera works at 6MHz, that doubles the processing time so I&#8217;m not complaining, and 15 FPS is good enough.</p>
<p>I&#8217;m writing everything in assembler at the moment. I have tried to find actual information about the cortex m3&#8242;s caches, but I really don&#8217;t know where to look. I find the SYSTICK timer useful for cycle-counting &#8211; but a reasonable amount of it is just guessing.</p>
<p>Unfortunately I cannot just poll the pixel clock line because each poll loop takes at minimum 8 or 9 cycles, which is not fast enough. My approach is to synchronise with the pixel clock line, so that my inline assembler will read each pixel at the centre of the PIXCLK waveform. The synchronisation will occur once before each line. I&#8217;m pretty sure that the pixel reading code will take consistently the same amount of time, because I tested it billions of times.</p>
<p>I did not know that interrupts were that responsive on the cortex m3, but using them would still reduce the FPS by a lot. Perhaps I will try them if I can&#8217;t get this CPU approach to work.</p>
<p>It is not just one point &#8211; it is a line laser pulsed at the exposure time of the camera, and I was thinking more for inside the house &#8211; navigating and building maps of walls etc, not a height map (ultrasonic sensors will probably be used for landing/ceiling awareness). But that will be next year! </p>
<p>I have found 3, 3 axis sensors (acc, gyro and magneto), and will probably just try making up some simple stuff to start with (complimentary filters and things) and just improve on that, a PID loop would also be used.</p>
<p>Thanks for your suggestions!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Random</title>
		<link>http://negativeacknowledge.com/2009/05/robot2-an-arm-based-colour-tracking-robot/comment-page-1/#comment-426</link>
		<dc:creator>Random</dc:creator>
		<pubDate>Tue, 27 Dec 2011 19:11:34 +0000</pubDate>
		<guid isPermaLink="false">http://negativeacknowledge.com/?p=51#comment-426</guid>
		<description>That is unusual. Have you tried using an oscilloscope to check the clock output? It&#039;s definitely capable of a 12MHz output, but maybe there&#039;s too much capacitance on the line for it to drive it effectively. Still, 6MHz should suffice if the camera will operate.

Processing each pixel on the fly seems reasonable. Are you writing the code for that in assembler or C? You might want to think about things like the caching system and how likely your code is to cause cache hits...
I was able to read in one line of data by having an interrupt fire on the HSYNC line and then reading bytes into memory by polling the pixel clock line. Once I&#039;d read an entire line, I had time to do quick processing of it (finding the centre of mass of red pixels on that line) before the next line started, an approach that sounds like it could also work for you. If you&#039;ve got per-pixel processing working well there&#039;s no point changing though. If interrupt latency is being an issue check out the various priority configuration options for the STM32&#039;s interrupts -- it&#039;s one of the most configurable and powerful interrupt systems in microchips these days and can probably work with what you need (I think they should be able to work down to just a couple of clock cycles...).

Doing SLAM sounds like fun. Is this laser just facing down, so you build a height map of the terrain you fly over? Trying to do localisation with such a narrow field of view (just one height measurement...) sounds like it might be tricky, though -- have you got a proof of concept or a simulation or anything working?

Some of the hardest bits of quadcopters is stabalisation: ideally you need sensor fusion (a Kalman filter or something) with a degree of freedom for, at least, three axis of gyro, magno and accel, and ideally also further DoFs for bias; plus you need control systems to keep the thing level and flying where you want it to go (a tuned PID or such) that work without a human in the loop to correct errors. That&#039;s not easy to do, though it&#039;s a problem other people have solved -- are you using (or considered using) things like OpenPilot or Paparazzi for your sensor fusion and control loops? Using their code might let you focus on the (already not trivial) problem of making the thing autonomous.


At any rate it sounds like a very exciting project, good luck!</description>
		<content:encoded><![CDATA[<p>That is unusual. Have you tried using an oscilloscope to check the clock output? It&#8217;s definitely capable of a 12MHz output, but maybe there&#8217;s too much capacitance on the line for it to drive it effectively. Still, 6MHz should suffice if the camera will operate.</p>
<p>Processing each pixel on the fly seems reasonable. Are you writing the code for that in assembler or C? You might want to think about things like the caching system and how likely your code is to cause cache hits&#8230;<br />
I was able to read in one line of data by having an interrupt fire on the HSYNC line and then reading bytes into memory by polling the pixel clock line. Once I&#8217;d read an entire line, I had time to do quick processing of it (finding the centre of mass of red pixels on that line) before the next line started, an approach that sounds like it could also work for you. If you&#8217;ve got per-pixel processing working well there&#8217;s no point changing though. If interrupt latency is being an issue check out the various priority configuration options for the STM32&#8242;s interrupts &#8212; it&#8217;s one of the most configurable and powerful interrupt systems in microchips these days and can probably work with what you need (I think they should be able to work down to just a couple of clock cycles&#8230;).</p>
<p>Doing SLAM sounds like fun. Is this laser just facing down, so you build a height map of the terrain you fly over? Trying to do localisation with such a narrow field of view (just one height measurement&#8230;) sounds like it might be tricky, though &#8212; have you got a proof of concept or a simulation or anything working?</p>
<p>Some of the hardest bits of quadcopters is stabalisation: ideally you need sensor fusion (a Kalman filter or something) with a degree of freedom for, at least, three axis of gyro, magno and accel, and ideally also further DoFs for bias; plus you need control systems to keep the thing level and flying where you want it to go (a tuned PID or such) that work without a human in the loop to correct errors. That&#8217;s not easy to do, though it&#8217;s a problem other people have solved &#8212; are you using (or considered using) things like OpenPilot or Paparazzi for your sensor fusion and control loops? Using their code might let you focus on the (already not trivial) problem of making the thing autonomous.</p>
<p>At any rate it sounds like a very exciting project, good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt B</title>
		<link>http://negativeacknowledge.com/2009/05/robot2-an-arm-based-colour-tracking-robot/comment-page-1/#comment-425</link>
		<dc:creator>Matt B</dc:creator>
		<pubDate>Tue, 27 Dec 2011 17:34:19 +0000</pubDate>
		<guid isPermaLink="false">http://negativeacknowledge.com/?p=51#comment-425</guid>
		<description>Thanks for the links, unfortunately I had the environment up and running quite a while ago (and on windows...), but they may be useful in the future.

After days of trying to get the camera to work, I had almost  given up. But just out of luck, I reduced the clock speed to 6MHz and now it seems to work perfectly! It&#039;s strange how the ARM can&#039;t seem to output 12MHZ (maybe rise/fall times are too high).

I&#039;m not planning to use DMA, nor to store the image data. Each pixel will be processed on-the-fly (I&#039;m making a laser triangulation depth sensor) - each in exactly 14 cycles. It is a bit risky, because I&#039;m not using a pixel clock to know when the data is valid, but I&#039;ve cycle-timed my processing code block and it is consistently 13 cycles (plus one NOP as a buffer). There will be 752 copies of the code inline (!!!) to process one row. Also the interrupt latency time is far too high and unpredictable to use (I think this is what you used for robot2). The brightest pixel&#039;s position in each column will be stored in the SRAM. Then, when the frame is over, will be converted into depth measurements and sent to the sensor&#039;s host (maybe another ARM chip) for SLAM or something. The camera will be running at about 14FPS so I think the sensor will be good enough for some pretty intelligent robots :)

I&#039;ve looked into quad-copters and it doesn&#039;t seem too bad, but something will probably crop up (although will hopefully crop back down again safely).

If you have any advice or think you can see any problems I&#039;d gladly absorb it :)</description>
		<content:encoded><![CDATA[<p>Thanks for the links, unfortunately I had the environment up and running quite a while ago (and on windows&#8230;), but they may be useful in the future.</p>
<p>After days of trying to get the camera to work, I had almost  given up. But just out of luck, I reduced the clock speed to 6MHz and now it seems to work perfectly! It&#8217;s strange how the ARM can&#8217;t seem to output 12MHZ (maybe rise/fall times are too high).</p>
<p>I&#8217;m not planning to use DMA, nor to store the image data. Each pixel will be processed on-the-fly (I&#8217;m making a laser triangulation depth sensor) &#8211; each in exactly 14 cycles. It is a bit risky, because I&#8217;m not using a pixel clock to know when the data is valid, but I&#8217;ve cycle-timed my processing code block and it is consistently 13 cycles (plus one NOP as a buffer). There will be 752 copies of the code inline (!!!) to process one row. Also the interrupt latency time is far too high and unpredictable to use (I think this is what you used for robot2). The brightest pixel&#8217;s position in each column will be stored in the SRAM. Then, when the frame is over, will be converted into depth measurements and sent to the sensor&#8217;s host (maybe another ARM chip) for SLAM or something. The camera will be running at about 14FPS so I think the sensor will be good enough for some pretty intelligent robots <img src='http://negativeacknowledge.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ve looked into quad-copters and it doesn&#8217;t seem too bad, but something will probably crop up (although will hopefully crop back down again safely).</p>
<p>If you have any advice or think you can see any problems I&#8217;d gladly absorb it <img src='http://negativeacknowledge.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Random</title>
		<link>http://negativeacknowledge.com/2009/05/robot2-an-arm-based-colour-tracking-robot/comment-page-1/#comment-423</link>
		<dc:creator>Random</dc:creator>
		<pubDate>Fri, 23 Dec 2011 21:56:40 +0000</pubDate>
		<guid isPermaLink="false">http://negativeacknowledge.com/?p=51#comment-423</guid>
		<description>Hi Matt! Hah, what a coincidence. Probably a bit late now but did you see &lt;a href=&quot;https://github.com/adamgreig/STM32_SkeletonProject&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;, &lt;a href=&quot;https://github.com/esden/summon-arm-toolchain&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; and &lt;a href=&quot;https://github.com/adamgreig/followingrobot&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt;? The first two are everything you need to get the dev environment working (on Linux and with command line build tools, at least...) while the third is all the source and build support stuff for my project. Might still be helpful for you.

A 752*480px camera sounds fairly hefty indeed! Are you storing the data coming off it, or trying to process it a line at a time? If you&#039;re storing the data, what on? If you&#039;re clocking it at 12MHz into the STM32 running at 72MHz that really gives you very, very, very few clock cycles to accomplish anything useful, it sounds like you&#039;d really better be using DMA from the GPIO peripheral to stand a chance. Alternatively the new STM32F4 line includes onboard camera peripherals that would interface with many embedded cameras directly, streaming image data into RAM (and have a lot more RAM to boot, too) which might make your life a lot easier!

The Sharp sensors should be fine indoors and are indeed a fairly good way of getting precise small-distance ranges, but an ultrasonic module might be better for distances in the range of a couple of metres -- less affected by interference, too.

It sounds like a really cool and ambitious project, I bet Mr P&#039;s excited for it! I&#039;ve toyed with autonomous quads too, and it&#039;s definitely not an easy undertaking. Best of luck! I&#039;d love to hear how it goes.</description>
		<content:encoded><![CDATA[<p>Hi Matt! Hah, what a coincidence. Probably a bit late now but did you see <a href="https://github.com/adamgreig/STM32_SkeletonProject" rel="nofollow">this</a>, <a href="https://github.com/esden/summon-arm-toolchain" rel="nofollow">this</a> and <a href="https://github.com/adamgreig/followingrobot" rel="nofollow">this</a>? The first two are everything you need to get the dev environment working (on Linux and with command line build tools, at least&#8230;) while the third is all the source and build support stuff for my project. Might still be helpful for you.</p>
<p>A 752*480px camera sounds fairly hefty indeed! Are you storing the data coming off it, or trying to process it a line at a time? If you&#8217;re storing the data, what on? If you&#8217;re clocking it at 12MHz into the STM32 running at 72MHz that really gives you very, very, very few clock cycles to accomplish anything useful, it sounds like you&#8217;d really better be using DMA from the GPIO peripheral to stand a chance. Alternatively the new STM32F4 line includes onboard camera peripherals that would interface with many embedded cameras directly, streaming image data into RAM (and have a lot more RAM to boot, too) which might make your life a lot easier!</p>
<p>The Sharp sensors should be fine indoors and are indeed a fairly good way of getting precise small-distance ranges, but an ultrasonic module might be better for distances in the range of a couple of metres &#8212; less affected by interference, too.</p>
<p>It sounds like a really cool and ambitious project, I bet Mr P&#8217;s excited for it! I&#8217;ve toyed with autonomous quads too, and it&#8217;s definitely not an easy undertaking. Best of luck! I&#8217;d love to hear how it goes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt B</title>
		<link>http://negativeacknowledge.com/2009/05/robot2-an-arm-based-colour-tracking-robot/comment-page-1/#comment-422</link>
		<dc:creator>Matt B</dc:creator>
		<pubDate>Thu, 22 Dec 2011 21:53:02 +0000</pubDate>
		<guid isPermaLink="false">http://negativeacknowledge.com/?p=51#comment-422</guid>
		<description>Sorry wrong e-mail.</description>
		<content:encoded><![CDATA[<p>Sorry wrong e-mail.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

