<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="http://forum.robosavvy.com/feed.php?f=2&amp;t=7862" />

<title>RoboSavvy Forum</title>
<subtitle>Robosavvy Forum: The largest online community of Humanoid Robot Builders</subtitle>
<link href="http://forum.robosavvy.com/index.php" />
<updated>2012-07-16T18:14:03+01:00</updated>

<author><name><![CDATA[RoboSavvy Forum]]></name></author>
<id>http://forum.robosavvy.com/feed.php?f=2&amp;t=7862</id>
<entry>
<author><name><![CDATA[kandrea]]></name></author>
<updated>2012-07-16T18:14:03+01:00</updated>
<published>2012-07-16T18:14:03+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34833#p34833</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34833#p34833"/>
<title type="html"><![CDATA[HeartToHeart 4 1.x vs 2.x EEPROM Addressing Changes]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34833#p34833"><![CDATA[
One point to reconcile between the document provided by PedroR and those in the followup by EngineerD is that the addressing map of the EEPROM changed following the release of HeartToHeart 4 2.0.<br /><br />These are the most significant changes which we noted that promulgated themselves on the RCB-4HV when migrating to HeartToHeart 4 v2.x<br /><br />MainLoopCmd Address moved from 0x0003FD to 0x00044B<br />Motion Slot Size changed from 4864 bytes to 2048 bytes<br />Highest Motion Slot changed from 0x3AEB8 to 0x3C3B8<br /><br />This is why half of the community is seeing 0x03FD and the other half is seeing 0x044B for the main program loop address. <br /><br />The 1.X EEPROM mapping is included in a PDF in this archive: <!-- m --><a class="postlink" href="http://kondo-robot.com/sys/wp-content/uploads/2010/08/RCB4RefsetV100R20100807.zip">http://kondo-robot.com/sys/wp-content/u ... 100807.zip</a><!-- m --><br /><br />The 2.X EEPROM mapping is included in a PDF in this archive: <!-- m --><a class="postlink" href="http://kondo-robot.com/sys/wp-content/uploads/2012/04/RCB4RefSetV200R20120420.zip">http://kondo-robot.com/sys/wp-content/u ... 120420.zip</a><!-- m --> <br /><br />This was a pseudo-hidden firmware update that HeartToHeart 4 2.1 did in order to expand the available motion slots up to 120 and to make room for some of the other new motion features.<br /><br />The strings provided by the RCB-4HV Command Generators will produce the proper strings, as listed in the thread.  It is just important to use version that generates strings for the software used to flash the ROM.<br /><br />Hope this helps,<br />kandrea<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=3469">kandrea</a> — Mon Jul 16, 2012 6:14 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[EngineerD]]></name></author>
<updated>2012-05-22T17:13:41+01:00</updated>
<published>2012-05-22T17:13:41+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34462#p34462</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34462#p34462"/>
<title type="html"><![CDATA[Serial Protocol for Controlling/Playing Motions on KHR3/RCB4]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34462#p34462"><![CDATA[
There are some mistakes in this manual<br />not really mistakes, but it's impossible to use just as written.<br /><br />You write that first of all we need to save status to ram - this is not true, by executing <span style="font-weight: bold">13 <span style="color: blue">00</span> <span style="color: darkred">02</span><span style="color: red"> 00 00 00</span> [b]21 87 fd 03 00 00 00 00 00 00 00 00</span> bd[/b]<br />you write to ram literal data  <span style="font-weight: bold">21 87 fd 03 00 00 00 00 00 00 00 00</span> from the start address <span style="color: red">00 00 00 </span>.<br /><br />This data are - 21 87 - value in SystemRegister and it means that [2x10000110000111] from left to right<br /> bit 0  - true means enable ICS Servos(could operate)<br /> bit 1 - true means enable execution programm from ROM<br /> bit 2 - means status of interpolation operation<br /> bit 3 - true means enable vector jumping<br /> bit 4,5 - means ICS frame size (00 - 10ms 01 - 15ms 10 - 20ms 11-25ms )<br /> bit 6,7 - means COM baudrate (00,11 - 115.2kbps  01 -625kbps 10 - 1.25Mbps)<br /> bit 8 - Zero flag<br /> bit 9 -Carry flag<br /> bit 10 - Error flag<br />bit 11,12 - not used<br />bit 13,14- means ICS baudrate(00,11 - 115.2kbps  01 -625kbps 10 - 1.25Mbps) <br />bit 15 - green LED activation<br /><br />FD 03 00 - address 00 03 FD writes into Program counter (this is main program loop address at ROM according documentation, but in my case it's 00 04 4B, in case of Ghettokon too.) <br />That's why, if user has different baudrates for ICS or COM, or different frame size it will not work correctly.<br /><br />Now, i will describe this<br /><img src="http://farm8.staticflickr.com/7273/6979329594_44d279c357.jpg" alt="Image" /><br />first command put robot in wait status(writes value 9080 to system register)<br />second command put address of wait loop 00044B to command counter and writes 0 to other counters and flags<br />third command calls motion from address 0133B8 (writes this value to command counter)<br />forth command switch robot to execution mode(writes 9B 80 to system register) and after this robot start playing motion.<br /><br />In PedroR manual first and second commands collaborates into one command.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2613">EngineerD</a> — Tue May 22, 2012 5:13 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Ghettokon]]></name></author>
<updated>2012-05-05T06:49:02+01:00</updated>
<published>2012-05-05T06:49:02+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34321#p34321</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34321#p34321"/>
<title type="html"><![CDATA[Serial Protocol for Controlling/Playing Motions on KHR3/RCB4]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34321#p34321"><![CDATA[
Hi P, <br /><br />Thanks so much for the direction! I will dig in to it. <br /><br />G<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2937">Ghettokon</a> — Sat May 05, 2012 6:49 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[PedroR]]></name></author>
<updated>2012-05-04T14:58:11+01:00</updated>
<published>2012-05-04T14:58:11+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34310#p34310</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34310#p34310"/>
<title type="html"><![CDATA[Serial Protocol for Controlling/Playing Motions on KHR3/RCB4]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34310#p34310"><![CDATA[
Ho Gethokon<br /><br />The last byte is most likelly a Checksum.<br /><br />It should be a result of a Bitwise operation betwen all the bytes that are sent before.<br /><br />My recommendation to find out how to calculate the checksum is to download libkondo and look in the source code how they're calculating the number.<br /><br />This is where we based our work to document the bytes sequences to play motions.<br /><br />Libkondo comes with much more features, including the individual control of the servos (which I believe is what you're trying to achieve).<br />It's all nicely coded in C and comes with makefiles and everything so it's only a matter of playing with it <img src="http://forum.robosavvy.com/images/smilies/icon_smile.gif" alt=":)" title="Smile" /><br /><br />Regards<br />Pedro.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1061">PedroR</a> — Fri May 04, 2012 2:58 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Ghettokon]]></name></author>
<updated>2012-05-04T03:51:41+01:00</updated>
<published>2012-05-04T03:51:41+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34304#p34304</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34304#p34304"/>
<title type="html"><![CDATA[Serial Protocol for Controlling/Playing Motions on KHR3/RCB4]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34304#p34304"><![CDATA[
I have everything working nicely so far with my set up:<br /><br />Play Motions: <br /><!-- m --><a class="postlink" href="http://www.youtube.com/watch?v=tLTJVtg4VNw">http://www.youtube.com/watch?v=tLTJVtg4VNw</a><!-- m --><br />Live feed: <br /><!-- m --><a class="postlink" href="http://www.youtube.com/watch?v=anJaYIr3_zg">http://www.youtube.com/watch?v=anJaYIr3_zg</a><!-- m --><br /><br />My ultimate goal is to have it connect to Kinect. The live feed demo above is made possible using this byte command: <br /><br />0A 00 12 06 05 00 4C 1D 00 90<br /><br />header ( same for all servo ): 0A 00 12 06<br />servo no.: 05 (right shoulder)<br />unknown byte: 00 (never changed in all the servo I worked with)<br />servo rotation: 4C1D (this is 0 for all servo on trim position)<br />unknown byte: 00 (never changed in all the servo I worked with)<br />*evil hex: 90 <br /><br />*This evil hex number increases and decreases with the lower byte of the servo rotation and it skips 1 number for some reason. And this 1 number is different from servo to servo e.g. right shoulder servo skips 44. <br /><br />I also found out another command which allows you to control all the servos at once. Without documentation, this is really bothersome because I don't know which one is more efficient to use for live feed...<br /><br /><br />cheers,<br />Ghettokon<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2937">Ghettokon</a> — Fri May 04, 2012 3:51 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Ghettokon]]></name></author>
<updated>2012-05-04T03:52:50+01:00</updated>
<published>2012-05-04T03:29:33+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34303#p34303</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34303#p34303"/>
<title type="html"><![CDATA[Serial Protocol for Controlling/Playing Motions on KHR3/RCB4]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34303#p34303"><![CDATA[
Hi PedroR<br /><br />I have a black version KHR-3HV (he was my wedding ring barrier!) , and I just updated to HTH4 before the last post. I don't know how to check the revision of my RCB 4 HV motherboard, I bought the set around June 2011 if that helps and the serial no. on the RCB board is Kondo E-139901A. <br /><br />Motion numbers are exactly the same but the commands are different than yours. I used your commands originally and they didn't work on my robot. Then I open my HTH4 and realized they are different... I think the version difference makes sense.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2937">Ghettokon</a> — Fri May 04, 2012 3:29 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[PedroR]]></name></author>
<updated>2012-05-02T12:46:47+01:00</updated>
<published>2012-05-02T12:46:47+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34288#p34288</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34288#p34288"/>
<title type="html"><![CDATA[Serial Protocol for Controlling/Playing Motions on KHR3/RCB4]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34288#p34288"><![CDATA[
Hi Ghettockon<br /><br />We have tested the documentation and script on 3 different HR 3HV Robots and it worked fine on all of them.<br /><br />Out of curiosity can you let us know what Robot model you have and also the Revision of your RCB 4 HV motherboard?<br /><br />I don't know how HTH2 affects the firmware onboard the RCB4 as we haven't used it yet.<br /><br />We tested the docs and protocol on KHR 3HV Robots programmed with HTH v1.x<br /><br />Thx<br />Pedro.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1061">PedroR</a> — Wed May 02, 2012 12:46 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Ghettokon]]></name></author>
<updated>2012-04-29T20:13:11+01:00</updated>
<published>2012-04-29T20:13:11+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34264#p34264</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34264#p34264"/>
<title type="html"><![CDATA[The byte sequence seems different...]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=34264#p34264"><![CDATA[
Thanks for putting this together! <br />I followed the steps and tried to send the byte sequence based on your document to my KHR-3HV. The robot didn't respond so I did the following: I opened up my H2H, played motion no.1, monitored the byte sequence in the message window. I realized the command byte sequences are different than the ones in the tutorial. The first and the last commands change according to the baud rate too somehow...<br /><br /><img src="http://farm8.staticflickr.com/7273/6979329594_44d279c357.jpg" alt="Image" /><p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2937">Ghettokon</a> — Sun Apr 29, 2012 8:13 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[PedroR]]></name></author>
<updated>2012-03-14T13:50:21+01:00</updated>
<published>2012-03-14T13:50:21+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=33889#p33889</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=33889#p33889"/>
<title type="html"><![CDATA[Serial Protocol for Controlling/Playing Motions on KHR3/RCB4]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=7862&amp;p=33889#p33889"><![CDATA[
Hi all<br /><br />Following up to our initial discussions on this thread <!-- m --><a class="postlink" href="http://robosavvy.com/forum/viewtopic.php?t=7811">http://robosavvy.com/forum/viewtopic.php?t=7811</a><!-- m -->, we have put together an English document detailing how to <span style="color: green">Control Motion Playing through the RCB4 Serial port/serial Protocol</span>.<br /><br /><span style="color: green">Our work is actually based on <a href="https://bitbucket.org/vo/libkondo4/wiki/Home" class="postlink">libkondo</a> (by chrivo)</span> and understanding what it does.<br /><br />Our approach was to document and hard code the Byte sequences necessary for Stopping a motion, Playing a specific Motion number and Querying the motion Status.<br /><br />While this is a bit of a brute force approach it has worked well for us and reliably for us.<br /><br /><br /><span style="color: green">Sequence for Playing a Motion:</span><br /><br />To play a Motion there are 4 steps:<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>    Step 1: Send a Command to Stop Current Program and Save Current Status to RAM. It's the same sequence of Bytes all the time regardless of the motion number.   <br /><br />    Step 2: Send the &quot;Run Motion&quot; Command. This command varies depending on the Motion number.<br /><br />    Step 3: Send Command to restore Current Status. It's the same sequence of Bytes all the time regardless of the motion number.        <br />                                                         <br />    Step 4 &#40;OPTIONAL&#41;: Wait for the Motion to Complete. You can do it polling the controller every 50ms to obtain Execution Status.<br />                &quot;&quot;Polling&quot;&quot; the controller for Execution Status is OPTIONAL.</code></dd></dl><br />The detailed sequence of Bytes for each Operation <span style="font-weight: bold">as well as Response codes</span> can be found on the  <a href="http://robosavvy.com/RoboSavvyPages/Support/Kondo/KHR3HVDocs/RCB4_SerialProtocolCommands_to_PlayMotions.pdf" class="postlink">Protocol Document</a> we've created.<br /><br />The part we've documented already offers good flexibility: you can start a motion, stop a motion and a<span style="font-weight: bold"> very handy one which is Query Motion status</span> to determine if a Motion is running or not.<br /><br />Also note that by following the sequence of steps above, it means that if you send another sequence to Play Motion while you're still executing a motion, the Robot will stop the current motion and will initiate the new motion.<br /><br /><br /><span style="color: green">Signal Levels and Sending commands Serial without using the Kondo USB Adapter HS:</span><br /><br />The Serial Commands are sent to RCB4 through the where the Kondo USb Adapter ICS connects when you want to use HTH.<br />You should set the Jumper position and connect the cable just as if you were going to use H2H.<br /><br />It <span style="font-weight: bold">is possible to send commands to RCB4 without using the Kondo USB Adapter HS</span> (ie using your own MCU of a Bluetooth or Zigbee module but please keep reading as there are some odd requirements for talking to the RCB4).<br /><br />RCB4 uses a Full Duplex bus and the pinout is explained in the picture bellow.<br /><br /><a href="http://www.flickr.com/photos/robosavvy/6981816245/" class="postlink"><img src="http://farm8.staticflickr.com/7046/6981816245_9ac5ef9829.jpg" alt="Image" /></a><br /><a href="http://www.flickr.com/photos/robosavvy/6981816245/" class="postlink">KHR 3HV- RCB4 Controller Pinout</a> by <a href="http://www.flickr.com/people/robosavvy/" class="postlink">RoboSavvy</a>, on Flickr<br /><br />In this scenario, you will probably <span style="color: green">need to a Logic Level converter because RCB4 uses 5V Inverted Logic.</span><br />We've built a simple one ourselves to convert from 3.3V TTL to 5V TTL inverted logic which we will hopefully post over the next weeks.<br />Inverted Logic Essentially means that a 1 is represented by +5V and and idle is represented by a low voltage. This is the opposite of TTL where idle is +3.3V (or +5V) and a &quot;1&quot; is low 0 V.<br />( It was not completely clear for us if it uses CMOS or TTL logic as the Oscilloscope showed us something but Googling and user reports suggested otherwise but we used TTL levels and it worked fine. )<br /><br />Also, as a side note, it seems the pinout for the PIO ports is incorrect in the manual. The outer pin is always GND (the manual mentions it's PIO on the outer pin). We _believe_ the pinout shown for PIO is correct in terms of where is Vdd and PIO but we haven't tested it thoroughly.<br /><br /><br />In terms of communication, another &quot;gotcha&quot; and odd feature of<span style="font-weight: bold"> RCB4 is that it uses EVEN parity</span> (instead of the more common &quot;No parity&quot;).<br /><br />Apart from that, you can set <span style="font-weight: bold">Baud Rate of RCB4</span> to different speed levels (ranging from 1.25 Mbps to 115 200bps) with setting: 8 data bits, 1 stop bit, EVEN parity.<br /><br /><br /><span style="color: green">Sample Python test Script</span><br /><br />We have also created a simple <a href="http://robosavvy.com/RoboSavvyPages/Support/Kondo/KHR3HVDocs/python_playmotion.py" class="postlink">Python script that you can use to test your code</a>.<br />To run it you will need install Python and to install the PySerial library.<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>Usage:<br />        python_playmotion.py &quot;COM_PORT&quot; MOTION_NUMBER &#91;TIMEOUT&#93;<br /><br /> COM_PORT should be specified in the form of &quot;COMx&quot; for Windows and &quot;/dev/ttySx&quot;<br /> or equivalent for Linux</code></dd></dl><br /><br />This Python code should run on Windows, Linux and Mac.<br /><br /><br /><span style="color: green">Finding out more information and more commands:</span><br /><br />If you'd like to find out more and really understand the complete structure of the packets (header, command and checksum), you may refer to <a href="https://bitbucket.org/vo/libkondo4/wiki/Home" class="postlink">libkondo</a> and also to the Japanese documentation release by Kondo here <!-- m --><a class="postlink" href="http://kondo-robot.com/sys/archives/2477">http://kondo-robot.com/sys/archives/2477</a><!-- m --> (thanks to EngineerD for pointing this out)<br /><br /><br /><span style="color: green">Downloads:</span><br /><br />The full PDF can be found here: <!-- m --><a class="postlink" href="http://robosavvy.com/RoboSavvyPages/Support/Kondo/KHR3HVDocs/RCB4_SerialProtocolCommands_to_PlayMotions.pdf">http://robosavvy.com/RoboSavvyPages/Sup ... otions.pdf</a><!-- m --><br /><br />Python test Script&#058; <!-- m --><a class="postlink" href="http://robosavvy.com/RoboSavvyPages/Support/Kondo/KHR3HVDocs/python_playmotion.py">http://robosavvy.com/RoboSavvyPages/Sup ... ymotion.py</a><!-- m --><br /><br />Regards<br />Pedro.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=1061">PedroR</a> — Wed Mar 14, 2012 1:50 pm</p><hr />
]]></content>
</entry>
</feed>