<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Wheel angle in EKF]]></title><description><![CDATA[<p>Hello</p>
<p>I intend to use IMU300ZI in our omnidirectional robot (can turn all 4 wheels into arbitrary but the same direction). The robot has speed encoder and wheel angle encoder so I want to use this info in EKF. As a base code I use your INS example project.<br />
I studied your code and think that the best place for wheel angle incorporation is in function <code>Update_PseudoMeasurement()</code> in UpdateFunctions.c. Instead of using <code>frontVelMea</code> variable as scalar I would make it vector the values of wich would be set based on current wheel angle, wheel speed and <code>gKalmanFilter.ppsEulerAngles[YAW]</code>. I would also set <code>gAlgorithm.velocityAlwaysAlongBodyX=FALSE</code>.</p>
<p>Odometer data would be received over SPI.<br />
Do you think this is correct solution or is there anything important I forgot about which could cause failure?</p>
<p>Thank you<br />
Regards<br />
Pavel</p>
]]></description><link>https://forum.aceinna.com//topic/243/wheel-angle-in-ekf</link><generator>RSS for Node</generator><lastBuildDate>Tue, 11 Aug 2026 17:14:59 GMT</lastBuildDate><atom:link href="https://forum.aceinna.com//topic/243.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 26 Feb 2021 15:20:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Wheel angle in EKF on Fri, 26 Feb 2021 15:20:43 GMT]]></title><description><![CDATA[<p>Hello</p>
<p>I intend to use IMU300ZI in our omnidirectional robot (can turn all 4 wheels into arbitrary but the same direction). The robot has speed encoder and wheel angle encoder so I want to use this info in EKF. As a base code I use your INS example project.<br />
I studied your code and think that the best place for wheel angle incorporation is in function <code>Update_PseudoMeasurement()</code> in UpdateFunctions.c. Instead of using <code>frontVelMea</code> variable as scalar I would make it vector the values of wich would be set based on current wheel angle, wheel speed and <code>gKalmanFilter.ppsEulerAngles[YAW]</code>. I would also set <code>gAlgorithm.velocityAlwaysAlongBodyX=FALSE</code>.</p>
<p>Odometer data would be received over SPI.<br />
Do you think this is correct solution or is there anything important I forgot about which could cause failure?</p>
<p>Thank you<br />
Regards<br />
Pavel</p>
]]></description><link>https://forum.aceinna.com//post/1048</link><guid isPermaLink="true">https://forum.aceinna.com//post/1048</guid><dc:creator><![CDATA[paha]]></dc:creator><pubDate>Fri, 26 Feb 2021 15:20:43 GMT</pubDate></item><item><title><![CDATA[Reply to Wheel angle in EKF on Mon, 01 Mar 2021 02:37:50 GMT]]></title><description><![CDATA[<p>Hello,</p>
<p>I think you are right. Just a reminder that the measured velocity in the body frame is no longer [frontVelMean, 0, 0] now. You may also rename Update_PseudoMeasurement() to something else because you are using actual measurements instead of pseudo ones.</p>
]]></description><link>https://forum.aceinna.com//post/1049</link><guid isPermaLink="true">https://forum.aceinna.com//post/1049</guid><dc:creator><![CDATA[Dong xiaoguang]]></dc:creator><pubDate>Mon, 01 Mar 2021 02:37:50 GMT</pubDate></item><item><title><![CDATA[Reply to Wheel angle in EKF on Mon, 01 Mar 2021 22:01:12 GMT]]></title><description><![CDATA[<p>Thank you very much for the reply.<br />
I'd like to ask one more question about function <code>_GenerateObservationJacobian_AHRS</code> in UpdateFunctions.c.</p>
<p>There is following comment for <code>uTheta</code></p>
<pre><code>/* Pitch (including modifications for |q| = 1 constraint)
     *   mu = 2*( q(1)*q(3) - q(2)*q(4) );
     *   % 2/sqrt(1-mu*mu) * [q(3); -q(4); q(1); -q(2)]
     *   2/sqrt(1-mu*mu) * [q(3) - mu*q(1);
     *                      -q(4) - mu*q(2);
     *                     q(1)- mu*q(3);
     *                     -q(2)- mu*q(4)]
     */
</code></pre>
<p>I know how to get this line</p>
<pre><code>% 2/sqrt(1-mu*mu) * [q(3); -q(4); q(1); -q(2)]
</code></pre>
<p>but don't know how you came to this</p>
<pre><code>2/sqrt(1-mu*mu) * [q(3) - mu*q(1);
     *                      -q(4) - mu*q(2);
     *                     q(1)- mu*q(3);
     *                     -q(2)- mu*q(4)]
</code></pre>
<p>which is most probably mentioned constraint for |q| = 1.</p>
<p>Could you please shed more light on it? Your code awesome and great practical EKF tutorial.</p>
<p>Thank you<br />
regards<br />
Pavel</p>
]]></description><link>https://forum.aceinna.com//post/1050</link><guid isPermaLink="true">https://forum.aceinna.com//post/1050</guid><dc:creator><![CDATA[paha]]></dc:creator><pubDate>Mon, 01 Mar 2021 22:01:12 GMT</pubDate></item><item><title><![CDATA[Reply to Wheel angle in EKF on Tue, 02 Mar 2021 01:19:03 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://forum.aceinna.com//uid/739">@paha</a></p>
<p>I found the derivation. I have used numerical differential of quaternion as reference to compare the two formula. The one with constraint did give better accuracy when pitch and roll are not close to 0.<br />
<img src="https://navview.blob.core.windows.net/forum/upload/6261bc78-d2b3-4fb5-9452-fa97fbd4c738-%E5%9B%BE%E7%89%87-klrbf4v5.png" alt="6261bc78-d2b3-4fb5-9452-fa97fbd4c738-图片.png" class="img-responsive img-markdown" /></p>
]]></description><link>https://forum.aceinna.com//post/1053</link><guid isPermaLink="true">https://forum.aceinna.com//post/1053</guid><dc:creator><![CDATA[Dong xiaoguang]]></dc:creator><pubDate>Tue, 02 Mar 2021 01:19:03 GMT</pubDate></item><item><title><![CDATA[Reply to Wheel angle in EKF on Wed, 03 Mar 2021 15:59:33 GMT]]></title><description><![CDATA[<p>I got it now.<br />
Thank you very much<br />
Regards<br />
Pavel</p>
]]></description><link>https://forum.aceinna.com//post/1055</link><guid isPermaLink="true">https://forum.aceinna.com//post/1055</guid><dc:creator><![CDATA[paha]]></dc:creator><pubDate>Wed, 03 Mar 2021 15:59:33 GMT</pubDate></item></channel></rss>