<?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=5&amp;t=7978" />

<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-14T13:44:48+01:00</updated>

<author><name><![CDATA[RoboSavvy Forum]]></name></author>
<id>http://forum.robosavvy.com/feed.php?f=5&amp;t=7978</id>
<entry>
<author><name><![CDATA[KurtE]]></name></author>
<updated>2012-07-14T13:44:48+01:00</updated>
<published>2012-07-14T13:44:48+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=7978&amp;p=34820#p34820</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=7978&amp;p=34820#p34820"/>
<title type="html"><![CDATA[Tell AX-12 servos to go from Point A to Point B in time X...]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=7978&amp;p=34820#p34820"><![CDATA[
Thanks for the reply.   <br /><br />Will try it out when I have some time and compare it to some of my experiments like updating the servos every 20ms or so to see which way works best.<br /><br />Thanks again<br />Kurt<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=136">KurtE</a> — Sat Jul 14, 2012 1:44 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[planius]]></name></author>
<updated>2012-07-08T01:54:04+01:00</updated>
<published>2012-07-08T01:54:04+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=7978&amp;p=34750#p34750</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=7978&amp;p=34750#p34750"/>
<title type="html"><![CDATA[Tell AX-12 servos to go from Point A to Point B in time X...]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=7978&amp;p=34750#p34750"><![CDATA[
That's how I do it in BioloidCControl (see here for more information: <a href="http://robosavvy.com/forum/viewtopic.php?t=7539" class="postlink">http://robosavvy.com/forum/viewtopic.php?t=7539</a>). It's not precise, but does offload the processing to the servos.<br /><br /><dl class="codebox"><dt>Code: </dt><dd><code>// Calculate servo speeds to achieve desired pose timing<br />// We make the following assumptions:<br />// AX-12 speed is 59rpm @ 12V which corresponds to 0.170s/60deg<br />// The AX-12 manual states this as the 'no load speed' at 12V<br />// The Moving Speed control table entry states that 0x3FF = 114rpm<br />// and according to Robotis this means 0x212 = 59rpm and anything greater 0x212 is also 59rpm<br />void calculatePoseServoSpeeds&#40;uint16 time&#41;<br />&#123;<br />    int i;<br />   uint16 travel&#91;NUM_AX12_SERVOS&#93;, temp_goal;<br />   uint32 factor;<br /><br />   // read the current pose only if we are not walking &#40;no time&#41;<br />   if&#40; walk_getWalkState&#40;&#41; == 0 &#41; &#123;<br />      readCurrentPose&#40;&#41;;      // takes 6ms<br />   &#125;   <br />   <br />   // TEST: printf&#40;&quot;\nCalculate Pose Speeds. Time = %i \n&quot;, time&#41;;<br />   // determine travel for each servo <br />   for &#40;i=0; i&lt;NUM_AX12_SERVOS; i++&#41;<br />   &#123;<br />      // TEST: printf&#40;&quot;\nDXL%i Current, Goal, Travel, Speed:&quot;, i+1&#41;;<br />      <br />      // process the joint offset values bearing in mind the different variable types<br />      temp_goal = &#40;int16&#41; goal_pose&#91;i&#93; + joint_offset&#91;i&#93;;<br />      if &#40; temp_goal &lt; 0 &#41; &#123; <br />         goal_pose&#91;i&#93; = 0;      // can't go below 0<br />      &#125; <br />      else if &#40; temp_goal &gt; 1023 &#41; &#123;<br />         goal_pose&#91;i&#93; = 1023;   // or above 1023<br />      &#125;<br />      else &#123;<br />         goal_pose&#91;i&#93; = &#40;uint16&#41; temp_goal;<br />      &#125;<br />      <br />      // find the amount of travel for each servo<br />      if&#40; goal_pose&#91;i&#93; &gt; current_pose&#91;i&#93;&#41; &#123;<br />         travel&#91;i&#93; = goal_pose&#91;i&#93; - current_pose&#91;i&#93;;<br />      &#125; else &#123;<br />         travel&#91;i&#93; = current_pose&#91;i&#93; - goal_pose&#91;i&#93;;<br />      &#125;<br />      <br />      // if we are walking we simply set the current pose as the goal pose to save time<br />      if&#40; walk_getWalkState&#40;&#41; != 0 &#41; &#123;<br />         current_pose&#91;i&#93; = goal_pose&#91;i&#93;;   <br />      &#125;      <br />   <br />      // now we can calculate the desired moving speed<br />      // for 59pm the factor is 847.46 which we round to 848<br />      // we need to use a temporary 32bit integer to prevent overflow<br />      factor = &#40;uint32&#41; 848 * travel&#91;i&#93;; <br />      goal_speed&#91;i&#93; = &#40;uint16&#41; &#40; factor / time &#41;;<br />      // if the desired speed exceeds the maximum, we need to adjust<br />      if &#40;goal_speed&#91;i&#93; &gt; 1023&#41; goal_speed&#91;i&#93; = 1023;<br />      // we also use a minimum speed of 26 &#40;5% of 530 the max value for 59RPM&#41;<br />      if &#40;goal_speed&#91;i&#93; &lt; 26&#41; goal_speed&#91;i&#93; = 26;<br />      <br />      // TEST: printf&#40;&quot; %u, %u, %u, %u&quot;, current_pose&#91;i&#93;, goal_pose&#91;i&#93;, travel&#91;i&#93;, goal_speed&#91;i&#93;&#41;;<br />   &#125;<br />   <br />&#125;<br /></code></dd></dl><p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2823">planius</a> — Sun Jul 08, 2012 1:54 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[KurtE]]></name></author>
<updated>2012-05-21T16:24:51+01:00</updated>
<published>2012-05-21T16:24:51+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=7978&amp;p=34448#p34448</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=7978&amp;p=34448#p34448"/>
<title type="html"><![CDATA[Tell AX-12 servos to go from Point A to Point B in time X...]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=7978&amp;p=34448#p34448"><![CDATA[
Sorry if this question has been asked before.  It has been a long time since I have been up here (back in my RoboNova days).  But recently I purchased a PhantomX robot up at Trossen and thought it would be fun to develop my own software for it.  (Actually adapt the Arduino Phoenix code...)<br /><br />I have been doing some experiments with the AX-12 servos and was wondering if anyone has come up with some algorithms or better yet  functions that given a servos position (and maybe speed), and a desired new location and how much time to get there, that it can set the appropriate parameters of the servos to do that.  <br /><br />I know that the Arbotix software does this, but it does it by constantly sending new position commands out to each of the servos.  I was wondering if you could offload most of this work to the servos themselves.   <br /><br />I have seen a few posts about the S Curves and the like, which I am still studying.<br /><br />Thanks<br />Kurt<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=136">KurtE</a> — Mon May 21, 2012 4:24 pm</p><hr />
]]></content>
</entry>
</feed>