rparedis 5 anni fa
parent
commit
865371f86c

BIN
doc/_build/doctrees/CBD.lib.io.doctree


BIN
doc/_build/doctrees/environment.pickle


+ 2 - 2
doc/_build/html/CBD.lib.endpoints.html

@@ -31,7 +31,7 @@
     <link rel="index" title="Index" href="genindex.html" />
     <link rel="search" title="Search" href="search.html" />
     <link rel="next" title="CBD.CBD module" href="CBD.CBD.html" />
-    <link rel="prev" title="CBD.lib.std module" href="CBD.lib.std.html" /> 
+    <link rel="prev" title="CBD.lib.io module" href="CBD.lib.io.html" /> 
 
   
   <script async src="https://www.googletagmanager.com/gtag/js?id=UA-167094275-1"></script>
@@ -495,7 +495,7 @@ remain valid.</p>
         <a href="CBD.CBD.html" class="btn btn-neutral float-right" title="CBD.CBD module" accesskey="n" rel="next">Next <img src="_static/images/chevron-right-orange.svg" class="next-page"></a>
       
       
-        <a href="CBD.lib.std.html" class="btn btn-neutral" title="CBD.lib.std module" accesskey="p" rel="prev"><img src="_static/images/chevron-right-orange.svg" class="previous-page"> Previous</a>
+        <a href="CBD.lib.io.html" class="btn btn-neutral" title="CBD.lib.io module" accesskey="p" rel="prev"><img src="_static/images/chevron-right-orange.svg" class="previous-page"> Previous</a>
       
     </div>
   

+ 4 - 1
doc/_build/html/CBD.lib.io.html

@@ -413,7 +413,10 @@ signal.</p>
 <dt id="CBD.lib.io.WriteCSV">
 <em class="property">class </em><code class="descclassname">CBD.lib.io.</code><code class="descname">WriteCSV</code><span class="sig-paren">(</span><em>block_name</em>, <em>filename</em>, <em>columns</em>, <em>time_col='time'</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/CBD/lib/io.html#WriteCSV"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#CBD.lib.io.WriteCSV" title="Permalink to this definition">¶</a></dt>
 <dd><p>Bases: <a class="reference internal" href="CBD.CBD.html#CBD.CBD.BaseBlock" title="CBD.CBD.BaseBlock"><code class="xref py py-class docutils literal notranslate"><span class="pre">CBD.CBD.BaseBlock</span></code></a></p>
-<p>Writes data to a CSV file.</p>
+<p>Outputs data to a CSV file.
+Every time a message is received, a new record is added to the file. At the
+end of the execution, when this block is destroyed, the file pointer will be
+closed (and removed).</p>
 <table class="docutils field-list" frame="void" rules="none">
 <col class="field-name" />
 <col class="field-body" />

+ 2 - 2
doc/_build/html/CBD.lib.std.html

@@ -30,7 +30,7 @@
   <link rel="stylesheet" href="_static/style.css" type="text/css" />
     <link rel="index" title="Index" href="genindex.html" />
     <link rel="search" title="Search" href="search.html" />
-    <link rel="next" title="CBD.lib.endpoints module" href="CBD.lib.endpoints.html" />
+    <link rel="next" title="CBD.lib.io module" href="CBD.lib.io.html" />
     <link rel="prev" title="Standard CBD Library (BBL)" href="CBD.lib.html" /> 
 
   
@@ -817,7 +817,7 @@ The block is implemented according to the trapezoid rule.</p>
   
     <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
       
-        <a href="CBD.lib.endpoints.html" class="btn btn-neutral float-right" title="CBD.lib.endpoints module" accesskey="n" rel="next">Next <img src="_static/images/chevron-right-orange.svg" class="next-page"></a>
+        <a href="CBD.lib.io.html" class="btn btn-neutral float-right" title="CBD.lib.io module" accesskey="n" rel="next">Next <img src="_static/images/chevron-right-orange.svg" class="next-page"></a>
       
       
         <a href="CBD.lib.html" class="btn btn-neutral" title="Standard CBD Library (BBL)" accesskey="p" rel="prev"><img src="_static/images/chevron-right-orange.svg" class="previous-page"> Previous</a>

File diff suppressed because it is too large
+ 1 - 1
doc/_build/html/_modules/CBD/CBD.html


+ 4 - 1
doc/_build/html/_modules/CBD/lib/io.html

@@ -440,7 +440,10 @@
 
 <div class="viewcode-block" id="WriteCSV"><a class="viewcode-back" href="../../../CBD.lib.io.html#CBD.lib.io.WriteCSV">[docs]</a><span class="k">class</span> <span class="nc">WriteCSV</span><span class="p">(</span><span class="n">BaseBlock</span><span class="p">):</span>
 	<span class="sd">&quot;&quot;&quot;</span>
-<span class="sd">	Writes data to a CSV file.</span>
+<span class="sd">	Outputs data to a CSV file.</span>
+<span class="sd">	Every time a message is received, a new record is added to the file. At the</span>
+<span class="sd">	end of the execution, when this block is destroyed, the file pointer will be</span>
+<span class="sd">	closed (and removed).</span>
 
 <span class="sd">	Args:</span>
 <span class="sd">		block_name (str):   The name of the block.</span>

File diff suppressed because it is too large
+ 8 - 5
doc/_build/html/_modules/CBD/realtime/plotting.html


File diff suppressed because it is too large
+ 1 - 1
doc/_build/html/searchindex.js


+ 4 - 4
examples/AGV/AGV_experiment.py

@@ -16,8 +16,8 @@ END = 200.0
 
 fig, ax1 = plt.subplots(1, 1)
 # fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(15, 7))
-ax1.set_xlim((-0.45, 0.45))
-ax1.set_ylim((-0.35, 0.55))
+ax1.set_xlim((-.45, .45))
+ax1.set_ylim((-.35, .55))
 # ax1.set_xlim((0, 100))
 # ax1.set_ylim((-0.07, 0.1))
 # ax2.set_xlim((0, END))
@@ -26,7 +26,7 @@ ax1.set_ylim((-0.35, 0.55))
 # ax1.set_title("Trajectory")
 # ax2.set_title("Accumulated Offset")
 
-cbd = AGVVirtual("AGVVirtual", initial=[0, -0.3, 0], Kp=0.06, Ki=0.0, Kd=0.05)
+cbd = AGVVirtual("AGVVirtual", path_file="paths/falcon.csv", initial=[0, -.3, 0], Kp=0.06, Ki=0.0, Kd=0.05)
 # cbd = AGVVirtual("AGVVirtual", initial=[0, -0.3, PI], Kp=Kp, Ki=Ki, Kd=Kd)
 # cbd = Test("Test")
 
@@ -53,7 +53,7 @@ manager.connect("heading", 'preupdate', update_arrow)
 
 # Run the Simulation
 sim = Simulator(cbd)
-sim.setRealTime(scale=1)
+sim.setRealTime(scale=.1)
 sim.setProgressBar()
 sim.setDeltaT(DELTA_T)
 sim.connect("finished", lambda: manager.stop())

+ 16 - 0
examples/AGV/paths/falcon-big.csv

@@ -0,0 +1,16 @@
+x, y
+-0.5, 1
+-1, 2
+-1, 5
+-2, 5
+-3, 1
+-3, -1
+-2, -3
+2, -3
+3, -1
+3, 1
+2, 5
+1, 5
+1, 2
+0.5, 1
+-0.5, 1

+ 4 - 1
src/CBD/lib/io.py

@@ -168,7 +168,10 @@ class ReadCSV(BaseBlock):
 
 class WriteCSV(BaseBlock):
 	"""
-	Writes data to a CSV file.
+	Outputs data to a CSV file.
+	Every time a message is received, a new record is added to the file. At the
+	end of the execution, when this block is destroyed, the file pointer will be
+	closed (and removed).
 
 	Args:
 		block_name (str):   The name of the block.