<?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[Python Simulation Randomness - demo_free_integration.py - FIXED]]></title><description><![CDATA[<p>Hello,</p>
<p>I've been running sims online, but have found it faster and easier to script by running locally.  I've been working wirh <em>demo_free_integration.py</em> currently.</p>
<p>I've noticed when I run the script 1x locally - the generated kml paths are the same.  When I try multiple runs like this:</p>
<p>sim.run(10)</p>
<p>I get results, but they are all duplicate, and very different than the online sim (generally much better position), when I use duplicate input motion params.</p>
<p>I'm using this file, but changed the data to: <em>motion_def-long_drive.csv</em> and line 74 changed to run 10x.</p>
<p><a href="https://github.com/Aceinna/gnss-ins-sim/blob/master/demo_free_integration.py" rel="nofollow">https://github.com/Aceinna/gnss-ins-sim/blob/master/demo_free_integration.py</a></p>
<p>When I run this <strong>online</strong> (5x), I get these results (RED) vs ref (GREEN) path:<br />
<img src="/assets/uploads/files/1555089889220-online_free_integration_imu381_6axis_sensor_long_drive.png" alt="ONLINE_free_integration_IMU381_6axis_sensor_long_drive.png" class="img-responsive img-markdown" /></p>
<p>When I run <strong>local</strong> (10x), I get these results:<br />
<img src="/assets/uploads/files/1555089968423-local_free_integration_imu381_6axis_sensor_long_drive.png" alt="LOCAL_free_integration_IMU381_6axis_sensor_long_drive.png" class="img-responsive img-markdown" /><br />
Difficult to see, but reference path is same, results are MUCH better, and all 10 runs are identical.</p>
<p>Here are my sensor settings:<br />
<img src="/assets/uploads/files/1555090994938-online_script_setting_match.png" alt="ONLINE_script_setting_MATCH.png" class="img-responsive img-markdown" /></p>
<p>And...</p>
<p>I once I had all this typed up, I found the error.</p>
<p>looks like I had copy and pasted a bit from <em>demo_free_integration_long_time.py</em> that had some sneaky changes:</p>
<pre><code>    #### IMU model, typical for IMU381
    imu_err = {'gyro_b': np.array([0.0, 0.0, 0.0]),
               'gyro_arw': np.array([0.25, 0.25, 0.25]) * 0.0,
               'gyro_b_stability': np.array([3.5, 3.5, 3.5]) * 0.0,
               'gyro_b_corr': np.array([100.0, 100.0, 100.0]),
               'accel_b': np.array([0.0e-3, 0.0e-3, 0.0e-3]),
               'accel_vrw': np.array([0.03119, 0.03009, 0.04779]) * 0.0,
               'accel_b_stability': np.array([4.29e-5, 5.72e-5, 8.02e-5]) * 0.0,
               'accel_b_corr': np.array([200.0, 200.0, 200.0]),
               'mag_std': np.array([0.2, 0.2, 0.2]) * 0.0
              }
</code></pre>
<p>Watch those * 0.0's !!  looks like someone added a tolerance fudger to the base errors and nulled them for that demo - this seems to have the effect of using a perfect gyro with some accel errors only.</p>
<p>With that fixed everything run as expected...</p>
<p>I'll leave this here for anyone that had the same issue.</p>
]]></description><link>https://forum.aceinna.com//topic/19/python-simulation-randomness-demo_free_integration-py-fixed</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Mar 2026 09:38:24 GMT</lastBuildDate><atom:link href="https://forum.aceinna.com//topic/19.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 12 Apr 2019 17:49:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Python Simulation Randomness - demo_free_integration.py - FIXED on Fri, 12 Apr 2019 17:49:20 GMT]]></title><description><![CDATA[<p>Hello,</p>
<p>I've been running sims online, but have found it faster and easier to script by running locally.  I've been working wirh <em>demo_free_integration.py</em> currently.</p>
<p>I've noticed when I run the script 1x locally - the generated kml paths are the same.  When I try multiple runs like this:</p>
<p>sim.run(10)</p>
<p>I get results, but they are all duplicate, and very different than the online sim (generally much better position), when I use duplicate input motion params.</p>
<p>I'm using this file, but changed the data to: <em>motion_def-long_drive.csv</em> and line 74 changed to run 10x.</p>
<p><a href="https://github.com/Aceinna/gnss-ins-sim/blob/master/demo_free_integration.py" rel="nofollow">https://github.com/Aceinna/gnss-ins-sim/blob/master/demo_free_integration.py</a></p>
<p>When I run this <strong>online</strong> (5x), I get these results (RED) vs ref (GREEN) path:<br />
<img src="/assets/uploads/files/1555089889220-online_free_integration_imu381_6axis_sensor_long_drive.png" alt="ONLINE_free_integration_IMU381_6axis_sensor_long_drive.png" class="img-responsive img-markdown" /></p>
<p>When I run <strong>local</strong> (10x), I get these results:<br />
<img src="/assets/uploads/files/1555089968423-local_free_integration_imu381_6axis_sensor_long_drive.png" alt="LOCAL_free_integration_IMU381_6axis_sensor_long_drive.png" class="img-responsive img-markdown" /><br />
Difficult to see, but reference path is same, results are MUCH better, and all 10 runs are identical.</p>
<p>Here are my sensor settings:<br />
<img src="/assets/uploads/files/1555090994938-online_script_setting_match.png" alt="ONLINE_script_setting_MATCH.png" class="img-responsive img-markdown" /></p>
<p>And...</p>
<p>I once I had all this typed up, I found the error.</p>
<p>looks like I had copy and pasted a bit from <em>demo_free_integration_long_time.py</em> that had some sneaky changes:</p>
<pre><code>    #### IMU model, typical for IMU381
    imu_err = {'gyro_b': np.array([0.0, 0.0, 0.0]),
               'gyro_arw': np.array([0.25, 0.25, 0.25]) * 0.0,
               'gyro_b_stability': np.array([3.5, 3.5, 3.5]) * 0.0,
               'gyro_b_corr': np.array([100.0, 100.0, 100.0]),
               'accel_b': np.array([0.0e-3, 0.0e-3, 0.0e-3]),
               'accel_vrw': np.array([0.03119, 0.03009, 0.04779]) * 0.0,
               'accel_b_stability': np.array([4.29e-5, 5.72e-5, 8.02e-5]) * 0.0,
               'accel_b_corr': np.array([200.0, 200.0, 200.0]),
               'mag_std': np.array([0.2, 0.2, 0.2]) * 0.0
              }
</code></pre>
<p>Watch those * 0.0's !!  looks like someone added a tolerance fudger to the base errors and nulled them for that demo - this seems to have the effect of using a perfect gyro with some accel errors only.</p>
<p>With that fixed everything run as expected...</p>
<p>I'll leave this here for anyone that had the same issue.</p>
]]></description><link>https://forum.aceinna.com//post/37</link><guid isPermaLink="true">https://forum.aceinna.com//post/37</guid><dc:creator><![CDATA[Adam Jackson]]></dc:creator><pubDate>Fri, 12 Apr 2019 17:49:20 GMT</pubDate></item><item><title><![CDATA[Reply to Python Simulation Randomness - demo_free_integration.py - FIXED on Mon, 15 Apr 2019 00:36:22 GMT]]></title><description><![CDATA[<p>Hi Adam,</p>
<p>Thank you for sharing.</p>
<p>Free integration with sensor error will diverge quickly. Those *0.0s is a switch to see what will happen when you turn on/off each error source.<br />
Indeed, numerical accuracy alone will cause differences from the reference trajectory after a long time. You can see that from the results you got from a local run.</p>
]]></description><link>https://forum.aceinna.com//post/38</link><guid isPermaLink="true">https://forum.aceinna.com//post/38</guid><dc:creator><![CDATA[Dong xiaoguang]]></dc:creator><pubDate>Mon, 15 Apr 2019 00:36:22 GMT</pubDate></item></channel></rss>