You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(59) |
Jun
(40) |
Jul
(59) |
Aug
(81) |
Sep
(14) |
Oct
(9) |
Nov
(22) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(25) |
Feb
(3) |
Mar
(27) |
Apr
(14) |
May
(15) |
Jun
(112) |
Jul
(44) |
Aug
(7) |
Sep
(18) |
Oct
(34) |
Nov
(17) |
Dec
(20) |
2006 |
Jan
(12) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(11) |
From: Dominic L. <ma...@us...> - 2004-11-04 18:51:44
|
Update of /cvsroot/robotflow/RobotFlow/demo/SymbolRecog In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8455 Modified Files: README.TXT Log Message: Updated demo Index: README.TXT =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/demo/SymbolRecog/README.TXT,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README.TXT 23 Aug 2004 23:36:37 -0000 1.2 --- README.TXT 4 Nov 2004 18:51:33 -0000 1.3 *************** *** 2,27 **** ---------------- ! This demo contains FlowDesigner networks that are used to ! recognize printed text (alphanumeric) extracted from live (real-time) ! 320x240 color images. FlowDesigner networks provided with this demo are ! easy to modify to suit your configuration (image size, video capture hardware). ! The idea with this demo is to provide a simple algorithm that extracts characters ! from color components. Characters are extracted from the image with a simple ! color segmentation algorithm (8 neighbors), with 1 color representing the background and ! 1 color representing the foreground color (printed text). When probable characters are ! found in the image, the algorithm gives incremental pan-tilt-zoom commands to the ! camera (if supported by the camera) to get the maximum resolution of the characters ! to extract. When the size of the characters is adequate, components are scaled and ! sent to a feed forward artificial neural network (ANN) on character at a time. The output ! of the ANN, for each character, is used as probability for each character to be part ! of any word in the dictionary. - Please read section 7.0 to get started with the demo. 2.0 PUBLICATIONS ---------------- ! L�ourneau, D., Michaud, F., Valin, J.-M., Proulx, C. (2003), "Textual message read by a mobile robot", ! Proceedings IEEE/RSJ International Conference on Intelligent Robots and Systems, p. 2724-2729 Available at : --- 2,28 ---- ---------------- ! This demo contains FlowDesigner networks that are used to recognize printed text ! (alphanumeric) extracted from live (real-time) 320x240 color images. ! FlowDesigner networks provided with this demo are easy to modify to suit your ! configuration (image size, video capture hardware). ! The idea with this demo is to provide a simple algorithm that extracts ! characters from color components. Characters are extracted from the image with ! a simple color segmentation algorithm (8 neighbors), with one color representing ! the background and one color representing the foreground color (printed text). ! When probable characters are found in the image, the algorithm gives incremental ! pan-tilt-zoom commands to the camera (if supported by the camera) to get the ! maximum resolution of the characters to extract. When the size of the characters ! is adequate, components are scaled and sent to a feed forward artificial neural ! network (ANN) on character at a time. The output of the ANN, for each character, ! is used as probability for each character to be part of any word in the ! dictionary. 2.0 PUBLICATIONS ---------------- ! Letourneau, D., Michaud, F., Valin, J.-M., Proulx, C. (2003), "Textual message ! read by a mobile robot", Proceedings IEEE/RSJ International Conference on ! Intelligent Robots and Systems, p. 2724-2729 Available at : *************** *** 35,39 **** 4.0 LICENSE ----------- ! LGPL, please visit http://www.gnu.org/copyleft/lesser.html for the full description. 5.0 REQUIREMENTS --- 36,41 ---- 4.0 LICENSE ----------- ! LGPL, please visit http://www.gnu.org/copyleft/lesser.html for the full ! description. 5.0 REQUIREMENTS *************** *** 44,50 **** - wget (to download the templates) ! You will also need to get the template images (required once) to get the full demo ! working properly. Simply run the getTemplates.sh script, it will download the required files ! and decompress them to the templates directory 2Mb download ( + 14Mb once decompressed). 6.0 PROVIDED FILES --- 46,57 ---- - wget (to download the templates) ! You will also need to get the template images (required once) to get the full ! demo working properly. Simply run the getTemplates.sh script, it will download ! the required files and decompress them to the templates directory 2Mb download ! (+ 14Mb once decompressed). ! ! Note : This demo is intended to work with a Sony SNC-RZ30 network camera. ! However, any V4L2 capture card with a PTZ could be used. The user must then ! modify the demo to suit its hardware. Please contact us if you need assistance. 6.0 PROVIDED FILES *************** *** 58,61 **** --- 65,69 ---- | |- testTraining.n (test the neural network training) | |- trainNeuralNet.n (train the neural network) + | |- colorTrain_SNCRZ30.n (train the color lookup) |- templates | |- README (Templates README) *************** *** 73,79 **** 7.0 HOW TO USE THE DEMO ----------------------- ! After you have installed all the softwares listed in Section 5, you are ready to start the demo. ! There are 3 steps to the procedure, but the first two are optional, since the trained ANN are provided ! with this demo. Training the neural networks may take 1-2 hours. From the demo/SymbolRecog directory : 2) Download the templates with the script getTemplate.sh (optional) --- 81,89 ---- 7.0 HOW TO USE THE DEMO ----------------------- ! After you have installed all the softwares listed in Section 5, you are ready to ! start the demo.There are 3 steps to the procedure, but the first two are ! optional, since the trained ANN are provided with this demo. Training the neural ! networks may take 1-2 hours. ! From the demo/SymbolRecog directory : 2) Download the templates with the script getTemplate.sh (optional) *************** *** 81,93 **** 4) Run the live demo with flowdesigner : - % flowdesigner SymbolTracking.n ! Comments are inserted into the flowdesigner networks so you can understand what's happening ! and make modifications to them according to your hardware and your needs. 8.0 HOW TO TRAIN NEURAL NETWORKS -------------------------------- 1) Go in the n-files directory ! 2) You must classify all the templates before you can train them (you only need to do that once) 2.1) To classify the templates run : % gflow classifyTemplates.n ! 2.2) You should see a GUI with a letter or digit appearing in the ImageProbe ("J" is the first one). 2.3) Enter the corresponding letter or digit in the SymbolKeypad 2.4) Click Forward on the probe "CLICK_FORWARD_FOR_NEXT_IMAGE" --- 91,109 ---- 4) Run the live demo with flowdesigner : - % flowdesigner SymbolTracking.n ! Comments are inserted into the flowdesigner networks so you can understand ! what's happening and make modifications to them according to your hardware and ! your needs. Symbols (text) must be printed black on orange sheet of paper for ! this demo to work properly. You could also change the color lookup files by ! running : ! - % flowdesigner colorTrain_SNCRZ30.n 8.0 HOW TO TRAIN NEURAL NETWORKS -------------------------------- 1) Go in the n-files directory ! 2) You must classify all the templates before you can train them (you only need ! to do that once) 2.1) To classify the templates run : % gflow classifyTemplates.n ! 2.2) You should see a GUI with a letter or digit appearing in the ImageProbe ! ("J" is the first one). 2.3) Enter the corresponding letter or digit in the SymbolKeypad 2.4) Click Forward on the probe "CLICK_FORWARD_FOR_NEXT_IMAGE" *************** *** 96,104 **** - ../templates/train_in_172_v2.data - ../templates/train_out_172_v2.data ! 3) The files will contain all data required to train the neural network (input & output vectors) 3.1) Training the network requires to run the following flowdesigner network : % gflow trainNeuralNet.n ! 3.2) You can also test the neural network by running the following flowdesigner network : ! % gflow testTraining.n --- 112,122 ---- - ../templates/train_in_172_v2.data - ../templates/train_out_172_v2.data ! 3) The files will contain all data required to train the neural network (input & ! output training sets (vectors) ) 3.1) Training the network requires to run the following flowdesigner network : % gflow trainNeuralNet.n ! 3.2) You can also test the neural network by running the following flowdesigner ! network : ! - % gflow testTraining.n |
From: Dominic L. <ma...@us...> - 2004-11-04 18:34:56
|
Update of /cvsroot/robotflow/RobotFlow/demo/SymbolRecog/n-files In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4163 Modified Files: colorTrain_SNCRZ30.n Log Message: added notes to network Index: colorTrain_SNCRZ30.n =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/demo/SymbolRecog/n-files/colorTrain_SNCRZ30.n,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** colorTrain_SNCRZ30.n 3 Nov 2004 21:55:36 -0000 1.1 --- colorTrain_SNCRZ30.n 4 Nov 2004 18:34:43 -0000 1.2 *************** *** 11,16 **** <NetOutput name="SAVE_FLAG" node="node_LOOP0_1" terminal="SAVE_FLAG" object_type="any" description="No description available"/> <NetOutput name="COMPONENTS_IMAGE" node="node_LOOP0_1" terminal="COMPONENTS_IMAGE" object_type="any" description="No description available"/> </Network> ! <Network type="subnet" name="SUBNET0"> <Node name="node_Components_1" type="Components" x="106.000000" y="206.000000"> <Parameter name="XGAP" type="int" value="1" description=""/> --- 11,17 ---- <NetOutput name="SAVE_FLAG" node="node_LOOP0_1" terminal="SAVE_FLAG" object_type="any" description="No description available"/> <NetOutput name="COMPONENTS_IMAGE" node="node_LOOP0_1" terminal="COMPONENTS_IMAGE" object_type="any" description="No description available"/> + <Note x="-576" y="485" visible="1" text="MAIN network is an infinite loop."/> </Network> ! <Network type="subnet" name="COLOR_TRAIN"> <Node name="node_Components_1" type="Components" x="106.000000" y="206.000000"> <Parameter name="XGAP" type="int" value="1" description=""/> *************** *** 19,23 **** <Parameter name="MIN_AREA" type="int" value="16" description=""/> </Node> ! <Node name="node_ComponentsViewer_1" type="ComponentsViewer" x="337.000000" y="199.000000"/> <Node name="node_ImageProbe_1" type="ImageProbe" x="618.000000" y="205.000000"> <Parameter name="HEIGHT" type="int" value="240" description=""/> --- 20,24 ---- <Parameter name="MIN_AREA" type="int" value="16" description=""/> </Node> ! <Node name="node_ComponentsViewer_1" type="ComponentsViewer" x="342.000000" y="198.000000"/> <Node name="node_ImageProbe_1" type="ImageProbe" x="618.000000" y="205.000000"> <Parameter name="HEIGHT" type="int" value="240" description=""/> *************** *** 55,59 **** <Link from="node_ColorTrain_1" output="OUTPUT" to="node_Components_1" input="IMAGE"/> <Link from="node_ColorTrain_1" output="LOOKUP" to="node_Components_1" input="LOOKUP"/> ! <Link from="node_ColorTrain_1" output="LOOKUP" to="node_ComponentsViewer_1" input="LOOKUP">-161.5 211.5 45 158 185 159 236 191.5 </Link> <Link from="node_Components_1" output="BLOBS" to="node_ComponentsViewer_1" input="DATA"/> <Link from="node_ComponentsViewer_1" output="IMAGE" to="node_ImageProbe_1" input="INPUT"/> --- 56,60 ---- <Link from="node_ColorTrain_1" output="OUTPUT" to="node_Components_1" input="IMAGE"/> <Link from="node_ColorTrain_1" output="LOOKUP" to="node_Components_1" input="LOOKUP"/> ! <Link from="node_ColorTrain_1" output="LOOKUP" to="node_ComponentsViewer_1" input="LOOKUP">-140.5 211.5 45 158 185 159 211.5 190.5 </Link> <Link from="node_Components_1" output="BLOBS" to="node_ComponentsViewer_1" input="DATA"/> <Link from="node_ComponentsViewer_1" output="IMAGE" to="node_ImageProbe_1" input="INPUT"/> *************** *** 68,71 **** --- 69,75 ---- <NetInput name="IMAGE_IN" node="node_ColorTrain_1" terminal="INPUT" object_type="any" description="No description available"/> <NetOutput name="COMPONENTS_IMAGE" node="node_ImageProbe_1" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="34" y="136" visible="1" text="Extracting all color components"/> + <Note x="463" y="151" visible="1" text="Display color components in the ImageProbe"/> + <Note x="157" y="583" visible="1" text="If the user click on "Save", the color lookup will be saved in the specified file. "/> </Network> <Network type="iterator" name="LOOP0"> *************** *** 78,93 **** <Parameter name="INQUIRY_POSITION" type="bool" value="false" description="Inquiry position of the pan,tilt,zoom from the device"/> </Node> ! <Node name="node_Constant_1" type="Constant" x="-680.000000" y="299.000000"> <Parameter name="VALUE" type="bool" value="true" description="The value"/> </Node> ! <Node name="node_PTZControl_1" type="PTZControl" x="-979.000000" y="188.000000"> <Parameter name="MIN_ZOOM_SLIDER_VAL" type="int" value="0" description="The command to send when in "WIDE" mode"/> <Parameter name="MAX_ZOOM_SLIDER_VAL" type="int" value="16384" description="The command to send when in "TELE" mode"/> </Node> ! <Node name="node_SUBNET0_1" type="SUBNET0" x="-209.000000" y="220.000000"> <Parameter name="COLOR_SAVE_FILENAME" type="string" value="../color_lookup/black_orange.data" description=""/> </Node> ! <Node name="node_RGB242RGB15_1" type="RGB242RGB15" x="-363.000000" y="218.000000"/> ! <Node name="node_NilObject_1" type="NilObject" x="-878.000000" y="297.000000"/> <Link from="node_PTZControl_1" output="ABS_PAN" to="node_SNCRZ30_1" input="PAN_ABS_POS"/> <Link from="node_PTZControl_1" output="ABS_TILT" to="node_SNCRZ30_1" input="TILT_ABS_POS"/> --- 82,97 ---- <Parameter name="INQUIRY_POSITION" type="bool" value="false" description="Inquiry position of the pan,tilt,zoom from the device"/> </Node> ! <Node name="node_Constant_1" type="Constant" x="-638.000000" y="266.000000"> <Parameter name="VALUE" type="bool" value="true" description="The value"/> </Node> ! <Node name="node_PTZControl_1" type="PTZControl" x="-978.000000" y="181.000000"> <Parameter name="MIN_ZOOM_SLIDER_VAL" type="int" value="0" description="The command to send when in "WIDE" mode"/> <Parameter name="MAX_ZOOM_SLIDER_VAL" type="int" value="16384" description="The command to send when in "TELE" mode"/> </Node> ! <Node name="node_SUBNET0_1" type="COLOR_TRAIN" x="-160.000000" y="207.000000"> <Parameter name="COLOR_SAVE_FILENAME" type="string" value="../color_lookup/black_orange.data" description=""/> </Node> ! <Node name="node_RGB242RGB15_1" type="RGB242RGB15" x="-343.000000" y="208.000000"/> ! <Node name="node_NilObject_1" type="NilObject" x="-874.000000" y="270.000000"/> <Link from="node_PTZControl_1" output="ABS_PAN" to="node_SNCRZ30_1" input="PAN_ABS_POS"/> <Link from="node_PTZControl_1" output="ABS_TILT" to="node_SNCRZ30_1" input="TILT_ABS_POS"/> *************** *** 104,107 **** --- 108,114 ---- <NetOutput name="SAVE_FLAG" node="node_SUBNET0_1" terminal="SAVE_FLAG" object_type="" description="The object from THEN or ELSE depending on COND"/> <NetOutput name="COMPONENTS_IMAGE" node="node_SUBNET0_1" terminal="COMPONENTS_IMAGE" object_type="" description="No description available"/> + <Note x="-927" y="445" visible="1" text="A Graphical User Interface will be displayed with PTZ control"/> + <Note x="-527" y="444" visible="1" text="Sony SNC-RZ30 driver"/> + <Note x="-83" y="442" visible="1" text="Color training GUI will be displayed."/> </Network> </Document> |
From: Dominic L. <ma...@us...> - 2004-11-04 18:28:27
|
Update of /cvsroot/robotflow/RobotFlow/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2998 Modified Files: demo.html robotflow.webprj Log Message: Updated demo images Index: robotflow.webprj =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/html/robotflow.webprj,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** robotflow.webprj 26 Oct 2004 19:01:54 -0000 1.9 --- robotflow.webprj 4 Nov 2004 18:28:15 -0000 1.10 *************** *** 1,35 **** <!DOCTYPE webproject> <webproject> ! <project preview="" type="Local" name="RobotFlow" > ! <upload/> ! <author>Dominic Letourneau</author> ! <email>dom...@co...</email> ! <item url="images/laborius_logo.jpg" /> ! <item url="index.html" /> ! <item url="home.html" /> ! <item url="menu.html" /> ! <item url="shots.html" /> ! <item url="authors.html" /> ! <item url="doc.html" /> ! <item url="links.html" /> ! <item url="download.html" /> ! <item url="news.html" /> ! <item url="doc.css" /> ! <item url="images/shot1.jpg" /> ! <templates>templates/</templates> ! <toolbars>toolbars/</toolbars> ! <item url="documents/" /> ! <item url="documents/FSMDescription.pdf" /> ! <item url="status.html" /> ! <item url="documents/RobotFlow_Presentation.pdf" /> ! <item url="demo.html" /> ! <item url="images/" /> ! <item url="images/CVS/" /> ! <item url="images/CVS/Entries" /> ! <item url="images/CVS/Repository" /> ! <item url="images/CVS/Root" /> ! <item url="images/laborius_logo_small.jpg" /> ! <item url="images/shot2.jpg" /> ! <item url="images/demo1.jpg" /> ! </project> </webproject> --- 1,39 ---- <!DOCTYPE webproject> <webproject> ! <project preview="" type="Local" name="RobotFlow" > ! <upload/> ! <author>Dominic Letourneau</author> ! <email>dom...@co...</email> ! <item url="images/laborius_logo.jpg" uploadstatus="0" /> ! <item url="index.html" uploadstatus="0" /> ! <item url="home.html" uploadstatus="0" /> ! <item url="menu.html" uploadstatus="0" /> ! <item url="shots.html" uploadstatus="0" /> ! <item url="authors.html" uploadstatus="0" /> ! <item url="doc.html" uploadstatus="0" /> ! <item url="links.html" uploadstatus="0" /> ! <item url="download.html" uploadstatus="0" /> ! <item url="news.html" uploadstatus="0" /> ! <item url="doc.css" uploadstatus="0" /> ! <item url="images/shot1.jpg" uploadstatus="0" /> ! <templates>templates/</templates> ! <toolbars>toolbars/</toolbars> ! <item url="documents/" uploadstatus="0" /> ! <item url="documents/FSMDescription.pdf" uploadstatus="0" /> ! <item url="status.html" uploadstatus="0" /> ! <item url="documents/RobotFlow_Presentation.pdf" uploadstatus="0" /> ! <item url="demo.html" uploadstatus="0" /> ! <item url="images/" uploadstatus="0" /> ! <item url="images/CVS/" uploadstatus="0" /> ! <item url="images/CVS/Entries" uploadstatus="0" /> ! <item url="images/CVS/Repository" uploadstatus="0" /> ! <item url="images/CVS/Root" uploadstatus="0" /> ! <item url="images/laborius_logo_small.jpg" uploadstatus="0" /> ! <item url="images/shot2.jpg" uploadstatus="0" /> ! <item url="images/demo1.jpg" uploadstatus="0" /> ! <item url="" uploadstatus="1" /> ! <item url="images/SymbolRecogDemo1.jpg" /> ! <item url="images/SymbolRecogDemo2.jpg" /> ! <item url="images/SymbolRecogDemo3.jpg" /> ! </project> </webproject> Index: demo.html =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/html/demo.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** demo.html 26 Oct 2004 19:01:53 -0000 1.1 --- demo.html 4 Nov 2004 18:28:15 -0000 1.2 *************** *** 7,19 **** </body> <H1>Symbol Recognition Demonstration (CVS)</H1> - <table width="100%"> - <tr> - <td> <center><img SRC="images/demo1.jpg" NOSAVE height=480 width=640></center></td> - </tr> - <tr> - <td><center>26/10/2004 Symbol Recognition Demo CVS</center></td> - </tr> - </table> <br> <br> --- 7,12 ---- </body> + <H1>Symbol Recognition Demonstration (CVS)</H1> <br> <br> *************** *** 38,42 **** <H1>DOWNLOAD</H1> 26/10/2004 Download will be available soon! However, you can already download it from the <a href="download.html">CVS</a>. ! <hr> <hr> <div align="right"> --- 31,47 ---- <H1>DOWNLOAD</H1> 26/10/2004 Download will be available soon! However, you can already download it from the <a href="download.html">CVS</a>. ! <H1>SCREENSHOTS</H1> ! ! <table width="100%" border="1" align="center"> ! <tr><td align="center"><img src="images/SymbolRecogDemo1.jpg" width="800" height="600" border="0"></td></tr> ! <tr><td align="center">04/11/2004 Symbol Recognition Demo (Template Classification)</td></tr> ! <tr><td align="center"><img src="images/SymbolRecogDemo2.jpg" width="800" height="600" border="0"></td></tr> ! <tr><td align="center">04/11/2004 Symbol Recognition Demo (Template Classification)</td></tr> ! <tr><td align="center"><img src="images/SymbolRecogDemo3.jpg" width="800" height="600" border="0"></td></tr> ! <tr><td align="center">04/11/2004 Symbol Recognition Demo (Color Training)</td></tr> ! <tr><td align="center"><img src="images/demo1.jpg" width="800" height="600" border="0"></td></tr> ! <tr><td align="center">04/11/2004 Symbol Recognition Demo (Live Symbol Extraction)</td></tr> ! </table> ! <hr> <div align="right"> |
From: Dominic L. <ma...@us...> - 2004-11-03 21:55:47
|
Update of /cvsroot/robotflow/RobotFlow/demo/SymbolRecog/n-files In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19497 Added Files: colorTrain_SNCRZ30.n Log Message: added a color training demo --- NEW FILE: colorTrain_SNCRZ30.n --- #!/usr/bin/env batchflow <?xml version="1.0"?> <Document> <Network type="subnet" name="MAIN"> <Node name="node_LOOP0_1" type="LOOP0" x="-695.000000" y="275.000000"> <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> </Node> <NetOutput name="ZOOM_POSITION" node="node_LOOP0_1" terminal="ZOOM_POSITION" object_type="" description="Returns the current zoom position of the Camera"/> <NetOutput name="TILT_POSITION" node="node_LOOP0_1" terminal="TILT_POSITION" object_type="" description="Returns the current tilt position of the Camera"/> <NetOutput name="PAN_POSITION" node="node_LOOP0_1" terminal="PAN_POSITION" object_type="" description="Returns the current pan position of the Camera"/> <NetOutput name="SAVE_FLAG" node="node_LOOP0_1" terminal="SAVE_FLAG" object_type="any" description="No description available"/> <NetOutput name="COMPONENTS_IMAGE" node="node_LOOP0_1" terminal="COMPONENTS_IMAGE" object_type="any" description="No description available"/> </Network> <Network type="subnet" name="SUBNET0"> <Node name="node_Components_1" type="Components" x="106.000000" y="206.000000"> <Parameter name="XGAP" type="int" value="1" description=""/> <Parameter name="YGAP" type="int" value="1" description=""/> <Parameter name="NUM_COLOR" type="int" value="4" description=""/> <Parameter name="MIN_AREA" type="int" value="16" description=""/> </Node> <Node name="node_ComponentsViewer_1" type="ComponentsViewer" x="337.000000" y="199.000000"/> <Node name="node_ImageProbe_1" type="ImageProbe" x="618.000000" y="205.000000"> <Parameter name="HEIGHT" type="int" value="240" description=""/> <Parameter name="WIDTH" type="int" value="320" description=""/> <Parameter name="BREAK_AT" type="int" value="" description=""/> <Parameter name="SHOW" type="bool" value="true" description=""/> <Parameter name="SKIP" type="int" value="" description=""/> </Node> <Node name="node_ColorTrain_1" type="ColorTrain" x="-255.000000" y="219.000000"> <Parameter name="LOAD_LOOKUP" type="subnet_param" value="COLOR_SAVE_FILENAME" description=""/> <Parameter name="HEIGHT" type="int" value="240" description=""/> <Parameter name="WIDTH" type="int" value="320" description=""/> <Parameter name="BREAK_AT" type="int" value="" description=""/> <Parameter name="SHOW" type="bool" value="true" description=""/> <Parameter name="SKIP" type="int" value="" description=""/> <Parameter name="H_DELTA" type="float" value="10.0" description=""/> <Parameter name="S_DELTA" type="float" value="0.30" description=""/> <Parameter name="V_DELTA" type="float" value="0.30" description=""/> <Parameter name="HSV_TRAINING" type="bool" value="true" description=""/> </Node> <Node name="node_Save_1" type="Save" x="43.000000" y="381.000000"> <Parameter name="PRETTY_PRINT" type="bool" value="false" description=""/> </Node> <Node name="node_OutputStream_1" type="OutputStream" x="-135.000000" y="388.000000"> <Parameter name="TYPE" type="String" value="" description=""/> </Node> <Node name="node_Constant_1" type="Constant" x="-250.000000" y="388.000000"> <Parameter name="VALUE" type="subnet_param" value="COLOR_SAVE_FILENAME" description=""/> </Node> <Node name="node_IF_1" type="IF" x="395.000000" y="382.000000"> <Parameter name="PULL_ANYWAY" type="bool" value="" description=""/> </Node> <Node name="node_NoCommand_1" type="NoCommand" x="213.000000" y="396.000000"/> <Node name="node_NoCommand_2" type="NoCommand" x="364.000000" y="259.000000"/> <Link from="node_ColorTrain_1" output="OUTPUT" to="node_Components_1" input="IMAGE"/> <Link from="node_ColorTrain_1" output="LOOKUP" to="node_Components_1" input="LOOKUP"/> <Link from="node_ColorTrain_1" output="LOOKUP" to="node_ComponentsViewer_1" input="LOOKUP">-161.5 211.5 45 158 185 159 236 191.5 </Link> <Link from="node_Components_1" output="BLOBS" to="node_ComponentsViewer_1" input="DATA"/> <Link from="node_ComponentsViewer_1" output="IMAGE" to="node_ImageProbe_1" input="INPUT"/> <Link from="node_NoCommand_2" output="OUTPUT" to="node_ImageProbe_1" input="SAVE_FILENAME"/> <Link from="node_ColorTrain_1" output="LOOKUP" to="node_Save_1" input="OBJECT"/> <Link from="node_OutputStream_1" output="OUTPUT" to="node_Save_1" input="STREAM"/> <Link from="node_Constant_1" output="VALUE" to="node_OutputStream_1" input="INPUT"/> <Link from="node_ColorTrain_1" output="SAVE_FLAG" to="node_IF_1" input="COND"/> <Link from="node_Save_1" output="OUTPUT" to="node_IF_1" input="THEN"/> <Link from="node_NoCommand_1" output="OUTPUT" to="node_IF_1" input="ELSE"/> <NetOutput name="SAVE_FLAG" node="node_IF_1" terminal="OUTPUT" object_type="any" description="The object from THEN or ELSE depending on COND"/> <NetInput name="IMAGE_IN" node="node_ColorTrain_1" terminal="INPUT" object_type="any" description="No description available"/> <NetOutput name="COMPONENTS_IMAGE" node="node_ImageProbe_1" terminal="OUTPUT" object_type="any" description="No description available"/> </Network> <Network type="iterator" name="LOOP0"> <Node name="node_SNCRZ30_1" type="SNCRZ30" x="-619.000000" y="182.000000"> <Parameter name="PAN_SPEED" type="int" value="24" description="Pan speed 0-24"/> <Parameter name="TILT_SPEED" type="int" value="20" description="Tilt speed 0-20"/> <Parameter name="HOST" type="string" value="192.168.1.149" description="No Description Available"/> <Parameter name="CONTINUOUS" type="bool" value="true" description="Continuously grab images "/> <Parameter name="WAIT_REPLY" type="bool" value="false" description="Wait for camera reply on commands"/> <Parameter name="INQUIRY_POSITION" type="bool" value="false" description="Inquiry position of the pan,tilt,zoom from the device"/> </Node> <Node name="node_Constant_1" type="Constant" x="-680.000000" y="299.000000"> <Parameter name="VALUE" type="bool" value="true" description="The value"/> </Node> <Node name="node_PTZControl_1" type="PTZControl" x="-979.000000" y="188.000000"> <Parameter name="MIN_ZOOM_SLIDER_VAL" type="int" value="0" description="The command to send when in "WIDE" mode"/> <Parameter name="MAX_ZOOM_SLIDER_VAL" type="int" value="16384" description="The command to send when in "TELE" mode"/> </Node> <Node name="node_SUBNET0_1" type="SUBNET0" x="-209.000000" y="220.000000"> <Parameter name="COLOR_SAVE_FILENAME" type="string" value="../color_lookup/black_orange.data" description=""/> </Node> <Node name="node_RGB242RGB15_1" type="RGB242RGB15" x="-363.000000" y="218.000000"/> <Node name="node_NilObject_1" type="NilObject" x="-878.000000" y="297.000000"/> <Link from="node_PTZControl_1" output="ABS_PAN" to="node_SNCRZ30_1" input="PAN_ABS_POS"/> <Link from="node_PTZControl_1" output="ABS_TILT" to="node_SNCRZ30_1" input="TILT_ABS_POS"/> <Link from="node_PTZControl_1" output="REL_PAN" to="node_SNCRZ30_1" input="PAN_REL_POS"/> <Link from="node_PTZControl_1" output="REL_TILT" to="node_SNCRZ30_1" input="TILT_REL_POS"/> <Link from="node_RGB242RGB15_1" output="RGB15_IMAGE" to="node_SUBNET0_1" input="IMAGE_IN"/> <Link from="node_SNCRZ30_1" output="IMAGE" to="node_RGB242RGB15_1" input="RGB24_IMAGE"/> <Link from="node_PTZControl_1" output="ABS_ZOOM" to="node_SNCRZ30_1" input="ZOOM_ABS_POS"/> <Link from="node_NilObject_1" output="VALUE" to="node_SNCRZ30_1" input="ZOOM_REL_POS"/> <NetCondition name="CONDITION" node="node_Constant_1" terminal="VALUE"/> <NetOutput name="ZOOM_POSITION" node="node_SNCRZ30_1" terminal="ZOOM_POSITION" object_type="int" description="Returns the current zoom position of the Camera"/> <NetOutput name="TILT_POSITION" node="node_SNCRZ30_1" terminal="TILT_POSITION" object_type="int" description="Returns the current tilt position of the Camera"/> <NetOutput name="PAN_POSITION" node="node_SNCRZ30_1" terminal="PAN_POSITION" object_type="int" description="Returns the current pan position of the Camera"/> <NetOutput name="SAVE_FLAG" node="node_SUBNET0_1" terminal="SAVE_FLAG" object_type="" description="The object from THEN or ELSE depending on COND"/> <NetOutput name="COMPONENTS_IMAGE" node="node_SUBNET0_1" terminal="COMPONENTS_IMAGE" object_type="" description="No description available"/> </Network> </Document> |
From: Dominic L. <ma...@us...> - 2004-11-03 18:38:32
|
Update of /cvsroot/robotflow/RobotFlow/demo/SymbolRecog/n-files In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9374 Modified Files: trainNeuralNet.n Log Message: added notes Index: trainNeuralNet.n =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/demo/SymbolRecog/n-files/trainNeuralNet.n,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** trainNeuralNet.n 3 Nov 2004 18:33:25 -0000 1.3 --- trainNeuralNet.n 3 Nov 2004 18:38:14 -0000 1.4 *************** *** 34,37 **** --- 34,38 ---- <NetOutput name="TRAIN_OUT_LENGTH" node="node_Length_2" terminal="OUTPUT" object_type="int" description="The length of the vector"/> <NetOutput name="OUTPUT" node="node_SaveAs_1" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="-1808" y="281" visible="1" text="This network will load training set and train the neural network. You will see the error displayed on the console at every epoch. Result will be save in : "/> </Network> <Network type="iterator" name="TRAIN_LOOP"> |
From: Dominic L. <ma...@us...> - 2004-11-03 18:33:36
|
Update of /cvsroot/robotflow/RobotFlow/demo/SymbolRecog/n-files In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8597 Modified Files: SymbolTracking.n trainNeuralNet.n Added Files: testTraining.n Removed Files: trainTemplates.n Log Message: added notes --- NEW FILE: testTraining.n --- #!/usr/bin/env batchflow <?xml version="1.0"?> <Document> <Network type="subnet" name="MAIN"> <Node name="node_LOOP0_1" type="LOOP0" x="484.000000" y="177.000000"> <Parameter name="DOWHILE" type="bool" value="true" description=""/> </Node> <Node name="node_InputStream_1" type="InputStream" x="-10.000000" y="126.000000"> <Parameter name="TYPE" type="string" value="stream" description=""/> <Parameter name="RETRY" type="int" value="1" description=""/> </Node> <Node name="node_Constant_1" type="Constant" x="-119.000000" y="125.000000"> <Parameter name="VALUE" type="string" value="../templates/Image.data" description=""/> </Node> <Node name="node_VarStore_1" type="VarStore" x="-4.000000" y="170.000000"> <Parameter name="VARIABLE" type="string" value="VAL" description=""/> </Node> <Node name="node_Constant_2" type="Constant" x="-111.000000" y="169.000000"> <Parameter name="VALUE" type="int" value="0" description=""/> </Node> <Node name="node_Action_2" type="Action" x="190.000000" y="170.000000"/> <Node name="node_NOP_1" type="NOP" x="284.000000" y="170.000000"/> <Node name="node_Constant_3" type="Constant" x="-128.000000" y="243.000000"> <Parameter name="VALUE" type="string" value="../color_lookup/black_white.data" description=""/> </Node> <Node name="node_InputStream_2" type="InputStream" x="-11.000000" y="243.000000"> <Parameter name="TYPE" type="string" value="stream" description=""/> <Parameter name="RETRY" type="int" value="1" description=""/> </Node> <Node name="node_Load_1" type="Load" x="117.000000" y="243.000000"/> <Node name="node_Constant_4" type="Constant" x="-121.000000" y="296.000000"> <Parameter name="VALUE" type="string" value="../neural_networks/net_172_7_36.nnet" description=""/> </Node> <Node name="node_InputStream_3" type="InputStream" x="-4.000000" y="296.000000"> <Parameter name="TYPE" type="string" value="stream" description=""/> <Parameter name="RETRY" type="int" value="1" description=""/> </Node> <Node name="node_Load_2" type="Load" x="124.000000" y="296.000000"/> <Link from="node_Constant_1" output="VALUE" to="node_InputStream_1" input="INPUT"/> <Link from="node_Constant_2" output="VALUE" to="node_VarStore_1" input="INPUT"/> <Link from="node_VarStore_1" output="OUTPUT" to="node_Action_2" input="BEFORE"/> <Link from="node_InputStream_1" output="OUTPUT" to="node_Action_2" input="INPUT"/> <Link from="node_NOP_1" output="OUTPUT" to="node_LOOP0_1" input="STREAM"/> <Link from="node_Action_2" output="OUTPUT" to="node_NOP_1" input="INPUT"/> <Link from="node_Constant_3" output="VALUE" to="node_InputStream_2" input="INPUT"/> <Link from="node_InputStream_2" output="OUTPUT" to="node_Load_1" input="STREAM"/> <Link from="node_Load_1" output="OUTPUT" to="node_LOOP0_1" input="LOOKUP"/> <Link from="node_Constant_4" output="VALUE" to="node_InputStream_3" input="INPUT"/> <Link from="node_InputStream_3" output="OUTPUT" to="node_Load_2" input="STREAM"/> <Link from="node_Load_2" output="OUTPUT" to="node_LOOP0_1" input="NNET"/> <NetOutput name="NNET_OUTPUT" node="node_LOOP0_1" terminal="NNET_OUTPUT" object_type="any" description="Pass through"/> <Note x="332" y="462" visible="1" text="This network will test every template and display the neural network output. It is useful to verify the if the ANN is trained properly. Please see classifyTemplates.n for more information on each subnet."/> </Network> <Network type="iterator" name="LOOP0"> <Node name="node_Load_1" type="Load" x="-631.000000" y="272.000000"/> <Node name="node_ImageProbe_1" type="ImageProbe" x="-294.000000" y="278.000000"> <Parameter name="HEIGHT" type="int" value="240" description=""/> <Parameter name="WIDTH" type="int" value="320" description=""/> <Parameter name="BREAK_AT" type="int" value="" description=""/> <Parameter name="SHOW" type="bool" value="true" description=""/> <Parameter name="SKIP" type="int" value="" description=""/> </Node> <Node name="node_Probe_1" type="Probe" x="-185.000000" y="278.000000"> <Parameter name="BREAK_AT" type="int" value="" description=""/> <Parameter name="SHOW" type="bool" value="true" description=""/> <Parameter name="SKIP" type="int" value="" description=""/> <Parameter name="PROBE_NAME" type="string" value="CLICK CONTINUE TO TEST ALL THE TEMPLATES" description=""/> </Node> <Node name="node_Smaller_1" type="Smaller" x="156.000000" y="-64.000000"/> <Node name="node_IterCount_1" type="IterCount" x="-93.000000" y="-74.000000"/> <Node name="node_Constant_1" type="Constant" x="9.000000" y="-29.000000"> <Parameter name="VALUE" type="int" value="1289" description=""/> </Node> <Node name="node_PROCESS_TEMPLATE_1" type="PROCESS_TEMPLATE" x="39.000000" y="285.000000"/> <Node name="node_Surround_1" type="Surround" x="-539.000000" y="272.000000"> <Parameter name="SPACING" type="int" value="10" description=""/> </Node> <Node name="node_Print_1" type="Print" x="1.000000" y="-73.000000"/> <Node name="node_NilObject_1" type="NilObject" x="-539.000000" y="316.000000"/> <Node name="node_NOP_1" type="NOP" x="92.000000" y="338.000000"/> <Node name="node_NNetExec_1" type="NNetExec" x="288.000000" y="294.000000"> <Parameter name="OUTPUTLENGTH" type="int" value="36" description="No description available"/> </Node> <Node name="node_TextProbe_1" type="TextProbe" x="463.000000" y="295.000000"> <Parameter name="BREAK_AT" type="int" value="-1" description="If set, the probe runs until (count = BREAK_AT)"/> <Parameter name="SHOW" type="bool" value="true" description="Whether or not to show the the data by default"/> <Parameter name="SKIP" type="int" value="" description="Count increment for each "Next""/> <Parameter name="PROBE_NAME" type="string" value="NNET_OUTPUT" description="Name (title) of the probe"/> </Node> <Link from="node_ImageProbe_1" output="OUTPUT" to="node_Probe_1" input="INPUT"/> <Link from="node_Constant_1" output="VALUE" to="node_Smaller_1" input="INPUT2"/> <Link from="node_Surround_1" output="IMAGE_OUT" to="node_ImageProbe_1" input="INPUT"/> <Link from="node_Load_1" output="OUTPUT" to="node_Surround_1" input="IMAGE_IN"/> <Link from="node_Print_1" output="OUTPUT" to="node_Smaller_1" input="INPUT1"/> <Link from="node_IterCount_1" output="OUTPUT" to="node_Print_1" input="INPUT"/> <Link from="node_NilObject_1" output="VALUE" to="node_ImageProbe_1" input="SAVE_FILENAME"/> <Link from="node_Probe_1" output="OUTPUT" to="node_PROCESS_TEMPLATE_1" input="IMAGE"/> <Link from="node_NOP_1" output="OUTPUT" to="node_NNetExec_1" input="NNET"/> <Link from="node_PROCESS_TEMPLATE_1" output="NNET_INPUT" to="node_NNetExec_1" input="INPUT"/> <Link from="node_NNetExec_1" output="OUTPUT" to="node_TextProbe_1" input="INPUT"/> <NetInput name="STREAM" node="node_Load_1" terminal="STREAM" object_type="any" description="No description available"/> <NetCondition name="CONDITION" node="node_Smaller_1" terminal="OUTPUT"/> <NetInput name="LOOKUP" node="node_PROCESS_TEMPLATE_1" terminal="LOOKUP" object_type="any" description="No description available"/> <NetInput name="NNET" node="node_NOP_1" terminal="INPUT" object_type="any" description="The input"/> <NetOutput name="NNET_OUTPUT" node="node_TextProbe_1" terminal="OUTPUT" object_type="any" description="Pass through"/> </Network> <Network type="subnet" name="PROCESS_TEMPLATE"> <Node name="node_Binarize_1" type="Binarize" x="-519.000000" y="-80.000000"/> <Node name="node_STAT_ANALYSIS_1" type="STAT_ANALYSIS" x="-736.000000" y="-112.000000"/> <Node name="node_NOP_1" type="NOP" x="-851.000000" y="-73.000000"/> <Node name="node_Components_1" type="Components" x="-258.000000" y="-70.000000"> <Parameter name="XGAP" type="int" value="1" description=""/> <Parameter name="YGAP" type="int" value="1" description=""/> <Parameter name="NUM_COLOR" type="int" value="2" description=""/> <Parameter name="MIN_AREA" type="int" value="16" description=""/> </Node> <Node name="node_SymbolExtractor_1" type="SymbolExtractor" x="-28.000000" y="-64.000000"> <Parameter name="CHANNEL" type="int" value="1" description=""/> </Node> <Node name="node_Constant_1" type="Constant" x="-229.000000" y="53.000000"> <Parameter name="VALUE" type="int" value="0" description=""/> </Node> <Node name="node_Scale_1" type="Scale" x="86.000000" y="-63.000000"> <Parameter name="WIDTH" type="int" value="13" description=""/> <Parameter name="HEIGHT" type="int" value="13" description=""/> <Parameter name="DEBUG" type="int" value="1" description=""/> </Node> <Node name="node_ScalePrint_1" type="ScalePrint" x="186.000000" y="-62.000000"> <Parameter name="WIDTH" type="int" value="13" description=""/> <Parameter name="HEIGHT" type="int" value="13" description=""/> </Node> <Node name="node_Concat_1" type="Concat" x="335.000000" y="-55.000000"/> <Node name="node_EXTRA_INFO_1" type="EXTRA_INFO" x="193.000000" y="-7.000000"/> <Link from="node_STAT_ANALYSIS_1" output="THRESHOLD" to="node_Binarize_1" input="THRESHOLD"/> <Link from="node_NOP_1" output="OUTPUT" to="node_STAT_ANALYSIS_1" input="IMAGE_IN"/> <Link from="node_NOP_1" output="OUTPUT" to="node_Binarize_1" input="IMAGE_IN"/> <Link from="node_Components_1" output="BLOBS" to="node_SymbolExtractor_1" input="DATA"/> <Link from="node_Constant_1" output="VALUE" to="node_SymbolExtractor_1" input="INDEX"/> <Link from="node_SymbolExtractor_1" output="SYMBOL" to="node_Scale_1" input="CRECT"/> <Link from="node_Scale_1" output="OUTPUT" to="node_ScalePrint_1" input="INPUT"/> <Link from="node_ScalePrint_1" output="OUTPUT" to="node_Concat_1" input="INPUT1"/> <Link from="node_SymbolExtractor_1" output="SYMBOL" to="node_EXTRA_INFO_1" input="INPUT"/> <Link from="node_Binarize_1" output="IMAGE_OUT" to="node_Components_1" input="IMAGE"/> <Link from="node_EXTRA_INFO_1" output="OUTPUT" to="node_Concat_1" input="INPUT2"/> <NetInput name="IMAGE" node="node_NOP_1" terminal="INPUT" object_type="any" description="No description available"/> <NetInput name="LOOKUP" node="node_Components_1" terminal="LOOKUP" object_type="any" description="No description available"/> <NetOutput name="NNET_INPUT" node="node_Concat_1" terminal="OUTPUT" object_type="any" description="No description available"/> </Network> <Network type="subnet" name="STAT_ANALYSIS"> <Node name="node_StatIntensityAnalyser_1" type="StatIntensityAnalyser" x="-210.000000" y="-280.000000"> <Parameter name="FRACTION_ANALYSED" type="float" value="0.1" description=""/> </Node> <Node name="node_Add_1" type="Add" x="81.000000" y="-280.000000"/> <Node name="node_Div_1" type="Div" x="178.000000" y="-262.000000"/> <Node name="node_Constant_1" type="Constant" x="65.000000" y="-240.000000"> <Parameter name="VALUE" type="float" value="2.5" description=""/> </Node> <Link from="node_StatIntensityAnalyser_1" output="MAX_INTENSITY" to="node_Add_1" input="INPUT1"/> <Link from="node_StatIntensityAnalyser_1" output="MIN_INTENSITY" to="node_Add_1" input="INPUT2"/> <Link from="node_Add_1" output="OUTPUT" to="node_Div_1" input="NUM"/> <Link from="node_Constant_1" output="VALUE" to="node_Div_1" input="DEN"/> <NetInput name="IMAGE_IN" node="node_StatIntensityAnalyser_1" terminal="IMAGE_IN" object_type="any" description="No description available"/> <NetOutput name="THRESHOLD" node="node_Div_1" terminal="OUTPUT" object_type="any" description="No description available"/> </Network> <Network type="subnet" name="EXTRA_INFO"> <Node name="node_NOP_1" type="NOP" x="-741.000000" y="185.000000"/> <Node name="node_Div_4" type="Div" x="-90.000000" y="163.000000"/> <Node name="node_Div_5" type="Div" x="-90.000000" y="206.000000"/> <Node name="node_Div_6" type="Div" x="-90.000000" y="244.000000"/> <Node name="node_RectAnalyser_2" type="RectAnalyser" x="-621.000000" y="185.000000"/> <Node name="node_Concat_1" type="Concat" x="133.000000" y="213.000000"/> <Node name="node_Concat_2" type="Concat" x="286.000000" y="170.000000"/> <Link from="node_RectAnalyser_2" output="HEIGHT" to="node_Div_4" input="NUM"/> <Link from="node_RectAnalyser_2" output="WIDTH" to="node_Div_4" input="DEN"/> <Link from="node_RectAnalyser_2" output="X_RELATIVE_CENTER_OF_GRAVITY" to="node_Div_5" input="NUM"/> <Link from="node_RectAnalyser_2" output="WIDTH" to="node_Div_5" input="DEN">-361.5 170 -275 170 -274 213 -144 213.5 </Link> <Link from="node_RectAnalyser_2" output="Y_RELATIVE_CENTER_OF_GRAVITY" to="node_Div_6" input="NUM">-361.5 215 -316 215 -276 236 -144 236.5 </Link> <Link from="node_RectAnalyser_2" output="HEIGHT" to="node_Div_6" input="DEN">-361.5 155 -283 156 -284 252 -144 251.5 </Link> <Link from="node_Div_5" output="OUTPUT" to="node_Concat_1" input="INPUT1"/> <Link from="node_Div_6" output="OUTPUT" to="node_Concat_1" input="INPUT2"/> <Link from="node_Div_4" output="OUTPUT" to="node_Concat_2" input="INPUT1"/> <Link from="node_Concat_1" output="OUTPUT" to="node_Concat_2" input="INPUT2"/> <Link from="node_NOP_1" output="OUTPUT" to="node_RectAnalyser_2" input="CRECT"/> <NetInput name="INPUT" node="node_NOP_1" terminal="INPUT" object_type="any" description="No description available"/> <NetOutput name="OUTPUT" node="node_Concat_2" terminal="OUTPUT" object_type="any" description="Result of the concatenation"/> </Network> </Document> Index: SymbolTracking.n =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/demo/SymbolRecog/n-files/SymbolTracking.n,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SymbolTracking.n 2 Nov 2004 15:47:48 -0000 1.7 --- SymbolTracking.n 3 Nov 2004 18:33:25 -0000 1.8 *************** *** 33,43 **** <NetOutput name="READING_FLAG" node="node_MAIN_LOOP_1" terminal="READING_FLAG" object_type="any" description="No description available"/> <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.8.1"/> </Network> <Network type="iterator" name="MAIN_LOOP"> ! <Node name="node_READ_1" type="READ" x="-218.000000" y="165.000000"/> <Node name="node_Constant_1" type="Constant" x="-218.000000" y="287.000000"> <Parameter name="VALUE" type="bool" value="true" description="The value"/> </Node> ! <Node name="node_SNCRZ30_1" type="SNCRZ30" x="-847.000000" y="183.000000"> <Parameter name="PAN_SPEED" type="int" value="24" description="Pan speed 0-24"/> <Parameter name="TILT_SPEED" type="int" value="20" description="Tilt speed 0-20"/> --- 33,44 ---- <NetOutput name="READING_FLAG" node="node_MAIN_LOOP_1" terminal="READING_FLAG" object_type="any" description="No description available"/> <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.8.1"/> + <Note x="-592" y="-183" visible="1" text="Load configuration files and LOOP forever. The colors and neural network must be properly trained before this network can work."/> </Network> <Network type="iterator" name="MAIN_LOOP"> ! <Node name="node_READ_1" type="READ" x="-221.000000" y="177.000000"/> <Node name="node_Constant_1" type="Constant" x="-218.000000" y="287.000000"> <Parameter name="VALUE" type="bool" value="true" description="The value"/> </Node> ! <Node name="node_SNCRZ30_1" type="SNCRZ30" x="-898.000000" y="185.000000"> <Parameter name="PAN_SPEED" type="int" value="24" description="Pan speed 0-24"/> <Parameter name="TILT_SPEED" type="int" value="20" description="Tilt speed 0-20"/> *************** *** 47,52 **** <Parameter name="INQUIRY_POSITION" type="bool" value="false" description="Inquiry position of the pan,tilt,zoom from the device"/> </Node> ! <Node name="node_RGB242RGB15_1" type="RGB242RGB15" x="-525.000000" y="245.000000"/> ! <Node name="node_NilObject_1" type="NilObject" x="-1203.000000" y="137.000000"/> <Node name="node_Feedback_1" type="Feedback" x="260.000000" y="246.000000"> <Parameter name="DELAY" type="int" value="1" description="Number of iteration for the delay"/> --- 48,53 ---- <Parameter name="INQUIRY_POSITION" type="bool" value="false" description="Inquiry position of the pan,tilt,zoom from the device"/> </Node> ! <Node name="node_RGB242RGB15_1" type="RGB242RGB15" x="-553.000000" y="293.000000"/> ! <Node name="node_NilObject_1" type="NilObject" x="-1193.000000" y="146.000000"/> <Node name="node_Feedback_1" type="Feedback" x="260.000000" y="246.000000"> <Parameter name="DELAY" type="int" value="1" description="Number of iteration for the delay"/> *************** *** 61,65 **** <Parameter name="BEFORE_LIMIT" type="int" value="0" description="When count - DELAY is smaller or equal to BEFORE_LIMIT, the input is pulled from BEFORE at (DELAY - count + BEFORE_LIMIT)"/> </Node> ! <Node name="node_NilObject_2" type="NilObject" x="-37.000000" y="310.000000"/> <Node name="node_TextProbe_1" type="TextProbe" x="100.000000" y="70.000000"> <Parameter name="BREAK_AT" type="int" value="-1" description="If set, the probe runs until (count = BREAK_AT)"/> --- 62,66 ---- <Parameter name="BEFORE_LIMIT" type="int" value="0" description="When count - DELAY is smaller or equal to BEFORE_LIMIT, the input is pulled from BEFORE at (DELAY - count + BEFORE_LIMIT)"/> </Node> ! <Node name="node_NilObject_2" type="NilObject" x="-112.000000" y="312.000000"/> <Node name="node_TextProbe_1" type="TextProbe" x="100.000000" y="70.000000"> <Parameter name="BREAK_AT" type="int" value="-1" description="If set, the probe runs until (count = BREAK_AT)"/> *************** *** 77,95 **** <Node name="node_NOP_2" type="NOP" x="102.000000" y="239.000000"/> <Node name="node_NOP_3" type="NOP" x="101.000000" y="295.000000"/> ! <Node name="node_ImageProbeSDL_1" type="ImageProbeSDL" x="-637.000000" y="314.000000"> <Parameter name="HEIGHT" type="int" value="240" description="The height of the image"/> <Parameter name="WIDTH" type="int" value="320" description="The width of the image"/> </Node> ! <Node name="node_SKIP_N_1" type="SKIP_N" x="7.000000" y="158.000000"> <Parameter name="SKIP_N" type="int" value="15" description="The value"/> </Node> ! <Node name="node_SKIP_N_2" type="SKIP_N" x="8.000000" y="199.000000"> <Parameter name="SKIP_N" type="int" value="15" description="The value"/> </Node> ! <Node name="node_SKIP_N_3" type="SKIP_N" x="8.000000" y="240.000000"> <Parameter name="SKIP_N" type="int" value="15" description="The value"/> </Node> ! <Node name="node_ComponentsViewer_1" type="ComponentsViewer" x="-79.000000" y="388.000000"/> ! <Node name="node_NOP_4" type="NOP" x="-558.000000" y="372.000000"/> <Node name="node_Components_1" type="Components" x="-351.000000" y="396.000000"> <Parameter name="XGAP" type="int" value="3" description="max X distance between two pixels of the same color blob."/> --- 78,96 ---- <Node name="node_NOP_2" type="NOP" x="102.000000" y="239.000000"/> <Node name="node_NOP_3" type="NOP" x="101.000000" y="295.000000"/> ! <Node name="node_ImageProbeSDL_1" type="ImageProbeSDL" x="-664.000000" y="208.000000"> <Parameter name="HEIGHT" type="int" value="240" description="The height of the image"/> <Parameter name="WIDTH" type="int" value="320" description="The width of the image"/> </Node> ! <Node name="node_SKIP_N_1" type="SKIP_N" x="7.000000" y="170.000000"> <Parameter name="SKIP_N" type="int" value="15" description="The value"/> </Node> ! <Node name="node_SKIP_N_2" type="SKIP_N" x="10.000000" y="238.000000"> <Parameter name="SKIP_N" type="int" value="15" description="The value"/> </Node> ! <Node name="node_SKIP_N_3" type="SKIP_N" x="9.000000" y="295.000000"> <Parameter name="SKIP_N" type="int" value="15" description="The value"/> </Node> ! <Node name="node_ComponentsViewer_1" type="ComponentsViewer" x="-75.000000" y="381.000000"/> ! <Node name="node_NOP_4" type="NOP" x="-572.000000" y="372.000000"/> <Node name="node_Components_1" type="Components" x="-351.000000" y="396.000000"> <Parameter name="XGAP" type="int" value="3" description="max X distance between two pixels of the same color blob."/> *************** *** 98,102 **** <Parameter name="MIN_AREA" type="int" value="16" description="minimum area of color blocs"/> </Node> ! <Node name="node_ImageProbe_1" type="ImageProbe" x="222.000000" y="398.000000"> <Parameter name="HEIGHT" type="int" value="240" description="The height of the image"/> <Parameter name="WIDTH" type="int" value="320" description="The width of the image"/> --- 99,103 ---- <Parameter name="MIN_AREA" type="int" value="16" description="minimum area of color blocs"/> </Node> ! <Node name="node_ImageProbe_1" type="ImageProbe" x="257.000000" y="387.000000"> <Parameter name="HEIGHT" type="int" value="240" description="The height of the image"/> <Parameter name="WIDTH" type="int" value="320" description="The width of the image"/> *************** *** 105,109 **** <Parameter name="SKIP" type="int" value="" description="No description available"/> </Node> ! <Node name="node_NilObject_3" type="NilObject" x="-22.000000" y="414.000000"/> <Link from="node_SNCRZ30_1" output="ZOOM_POSITION" to="node_READ_1" input="CURRENT_ABS_ZOOM"/> <Link from="node_NilObject_1" output="VALUE" to="node_SNCRZ30_1" input="TILT_ABS_POS"/> --- 106,110 ---- <Parameter name="SKIP" type="int" value="" description="No description available"/> </Node> ! <Node name="node_NilObject_3" type="NilObject" x="41.000000" y="413.000000"/> <Link from="node_SNCRZ30_1" output="ZOOM_POSITION" to="node_READ_1" input="CURRENT_ABS_ZOOM"/> <Link from="node_NilObject_1" output="VALUE" to="node_SNCRZ30_1" input="TILT_ABS_POS"/> *************** *** 113,123 **** <Link from="node_READ_1" output="SENTENCE" to="node_TextProbe_1" input="INPUT"/> <Link from="node_READ_1" output="ORIGINAL_TEXT" to="node_TextProbe_2" input="INPUT"/> ! <Link from="node_Feedback_1" output="DELAY" to="node_SNCRZ30_1" input="TILT_REL_POS">354 253.5 447 254 447 503 -1106 504 -1106 191 -991 190.5 </Link> <Link from="node_RGB242RGB15_1" output="RGB15_IMAGE" to="node_READ_1" input="RGB15_IMAGE"/> <Link from="node_ImageProbeSDL_1" output="OUTPUT" to="node_RGB242RGB15_1" input="RGB24_IMAGE"/> <Link from="node_SNCRZ30_1" output="IMAGE" to="node_ImageProbeSDL_1" input="INPUT"/> ! <Link from="node_Feedback_3" output="DELAY" to="node_SNCRZ30_1" input="ZOOM_ABS_POS">354 311.5 396 311 396 431 -1067 431 -1068 209 -991 205.5 </Link> <Link from="node_NilObject_1" output="VALUE" to="node_SNCRZ30_1" input="ZOOM_REL_POS"/> ! <Link from="node_Feedback_2" output="DELAY" to="node_SNCRZ30_1" input="PAN_REL_POS">351 182.5 531 182 531 576 -1176 577 -1175 175 -991 175.5 </Link> <Link from="node_NOP_1" output="OUTPUT" to="node_Feedback_2" input="INPUT"/> <Link from="node_SKIP_N_1" output="OUTPUT" to="node_NOP_1" input="INPUT"/> --- 114,124 ---- <Link from="node_READ_1" output="SENTENCE" to="node_TextProbe_1" input="INPUT"/> <Link from="node_READ_1" output="ORIGINAL_TEXT" to="node_TextProbe_2" input="INPUT"/> ! <Link from="node_Feedback_1" output="DELAY" to="node_SNCRZ30_1" input="TILT_REL_POS">355.5 253.5 447 254 447 503 -1106 504 -1106 191 -1044.5 192.5 </Link> <Link from="node_RGB242RGB15_1" output="RGB15_IMAGE" to="node_READ_1" input="RGB15_IMAGE"/> <Link from="node_ImageProbeSDL_1" output="OUTPUT" to="node_RGB242RGB15_1" input="RGB24_IMAGE"/> <Link from="node_SNCRZ30_1" output="IMAGE" to="node_ImageProbeSDL_1" input="INPUT"/> ! <Link from="node_Feedback_3" output="DELAY" to="node_SNCRZ30_1" input="ZOOM_ABS_POS">355.5 311.5 396 311 396 431 -1067 431 -1068 209 -1044.5 207.5 </Link> <Link from="node_NilObject_1" output="VALUE" to="node_SNCRZ30_1" input="ZOOM_REL_POS"/> ! <Link from="node_Feedback_2" output="DELAY" to="node_SNCRZ30_1" input="PAN_REL_POS">352.5 182.5 531 182 531 576 -1176 577 -1175 175 -1044.5 177.5 </Link> <Link from="node_NOP_1" output="OUTPUT" to="node_Feedback_2" input="INPUT"/> <Link from="node_SKIP_N_1" output="OUTPUT" to="node_NOP_1" input="INPUT"/> *************** *** 151,154 **** --- 152,159 ---- <NetOutput name="COMPONENTS" node="node_ImageProbe_1" terminal="OUTPUT" object_type="any" description="No description available"/> <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.8.1"/> + <Note x="-877" y="393" visible="1" text="You must have a Sony SNC-RZ30 Network Camera for this network to work. You can replace this by having a V4L2 capture board and a PTZ camera."/> + <Note x="-223" y="97" visible="1" text="The READ network will do all the processing to extract text from images at each iteration."/> + <Note x="-325" y="593" visible="1" text="The Components, ComponentsViewer and ImageProbe are useful only to display color components for the user. They can be removed without changing the outcome of the algorithm."/> + <Note x="439" y="136" visible="1" text="SKIP_N blocks are useful because the SNCRZ30 camera is too slow and we have to limit the number of PTZ commands else it will overflow. We give a commande every 15 iterations."/> </Network> <Network type="subnet" name="SKIP_N"> Index: trainNeuralNet.n =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/demo/SymbolRecog/n-files/trainNeuralNet.n,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** trainNeuralNet.n 23 Aug 2004 19:02:39 -0000 1.2 --- trainNeuralNet.n 3 Nov 2004 18:33:25 -0000 1.3 *************** *** 3,13 **** <Document> <Network type="subnet" name="MAIN"> ! <Node name="node_LoadFile_1" type="LoadFile" x="-2313.000000" y="-109.000000"> <Parameter name="FILENAME" type="string" value="../templates/train_in_172_v2.data" description="No description available"/> </Node> ! <Node name="node_LoadFile_2" type="LoadFile" x="-2316.000000" y="-36.000000"> <Parameter name="FILENAME" type="string" value="../templates/train_out_172_v2.data" description="No description available"/> </Node> ! <Node name="node_NNetInit_1" type="NNetInit" x="-1983.000000" y="14.000000"> <Parameter name="TOPO" type="string" value="<Vector 172 7 36>" description="Number of units on each layer (including input and output layers)"/> <Parameter name="FUNCTIONS" type="string" value="<Vector tansig tansig tansig>" description="Activation functions for each layer (except the input layer)"/> --- 3,13 ---- <Document> <Network type="subnet" name="MAIN"> ! <Node name="node_LoadFile_1" type="LoadFile" x="-2327.000000" y="-40.000000"> <Parameter name="FILENAME" type="string" value="../templates/train_in_172_v2.data" description="No description available"/> </Node> ! <Node name="node_LoadFile_2" type="LoadFile" x="-2324.000000" y="-2.000000"> <Parameter name="FILENAME" type="string" value="../templates/train_out_172_v2.data" description="No description available"/> </Node> ! <Node name="node_NNetInit_1" type="NNetInit" x="-2003.000000" y="31.000000"> <Parameter name="TOPO" type="string" value="<Vector 172 7 36>" description="Number of units on each layer (including input and output layers)"/> <Parameter name="FUNCTIONS" type="string" value="<Vector tansig tansig tansig>" description="Activation functions for each layer (except the input layer)"/> *************** *** 18,23 **** <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> </Node> ! <Node name="node_Length_1" type="Length" x="-2094.000000" y="-179.000000"/> ! <Node name="node_Length_2" type="Length" x="-2098.000000" y="123.000000"/> <Node name="node_SaveAs_1" type="SaveAs" x="-1628.000000" y="0.000000"> <Parameter name="FILENAME" type="string" value="../neural_networks/net_172_7_36.nnet" description="No description available"/> --- 18,23 ---- <Parameter name="DOWHILE" type="bool" value="" description="No description available"/> </Node> ! <Node name="node_Length_1" type="Length" x="-2082.000000" y="-79.000000"/> ! <Node name="node_Length_2" type="Length" x="-2085.000000" y="100.000000"/> <Node name="node_SaveAs_1" type="SaveAs" x="-1628.000000" y="0.000000"> <Parameter name="FILENAME" type="string" value="../neural_networks/net_172_7_36.nnet" description="No description available"/> --- trainTemplates.n DELETED --- |
From: Dominic L. <ma...@us...> - 2004-11-02 16:31:49
|
Update of /cvsroot/robotflow/RobotFlow/demo/SymbolRecog/n-files In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5672 Modified Files: classifyTemplates.n Log Message: Added Notes in the classifyTemplates network Index: classifyTemplates.n =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/demo/SymbolRecog/n-files/classifyTemplates.n,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** classifyTemplates.n 23 Aug 2004 20:42:36 -0000 1.4 --- classifyTemplates.n 2 Nov 2004 16:31:38 -0000 1.5 *************** *** 3,7 **** <Document> <Network type="subnet" name="MAIN"> ! <Node name="node_LOOP0_1" type="LOOP0" x="484.000000" y="177.000000"> <Parameter name="DOWHILE" type="bool" value="true" description=""/> </Node> --- 3,7 ---- <Document> <Network type="subnet" name="MAIN"> ! <Node name="node_LOOP0_1" type="LOOP0" x="483.000000" y="177.000000"> <Parameter name="DOWHILE" type="bool" value="true" description=""/> </Node> *************** *** 10,14 **** <Parameter name="RETRY" type="int" value="1" description=""/> </Node> ! <Node name="node_Constant_1" type="Constant" x="-111.000000" y="61.000000"> <Parameter name="VALUE" type="string" value="../templates/Image.data" description=""/> </Node> --- 10,14 ---- <Parameter name="RETRY" type="int" value="1" description=""/> </Node> ! <Node name="node_Constant_1" type="Constant" x="-112.000000" y="63.000000"> <Parameter name="VALUE" type="string" value="../templates/Image.data" description=""/> </Node> *************** *** 31,38 **** <Node name="node_NewAccumulator_1" type="NewAccumulator" x="155.000000" y="305.000000"/> <Node name="node_NewAccumulator_2" type="NewAccumulator" x="150.000000" y="391.000000"/> ! <Node name="node_SaveAs_1" type="SaveAs" x="721.000000" y="148.000000"> <Parameter name="FILENAME" type="string" value="../templates/train_in_172_v2.data" description=""/> </Node> ! <Node name="node_SaveAs_2" type="SaveAs" x="722.000000" y="185.000000"> <Parameter name="FILENAME" type="string" value="../templates/train_out_172_v2.data" description=""/> </Node> --- 31,38 ---- <Node name="node_NewAccumulator_1" type="NewAccumulator" x="155.000000" y="305.000000"/> <Node name="node_NewAccumulator_2" type="NewAccumulator" x="150.000000" y="391.000000"/> ! <Node name="node_SaveAs_1" type="SaveAs" x="720.000000" y="148.000000"> <Parameter name="FILENAME" type="string" value="../templates/train_in_172_v2.data" description=""/> </Node> ! <Node name="node_SaveAs_2" type="SaveAs" x="720.000000" y="185.000000"> <Parameter name="FILENAME" type="string" value="../templates/train_out_172_v2.data" description=""/> </Node> *************** *** 52,55 **** --- 52,57 ---- <NetOutput name="ACCUM_IN" node="node_SaveAs_1" terminal="OUTPUT" object_type="any" description="No description available"/> <NetOutput name="ACCUM_OUT" node="node_SaveAs_2" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="249" y="75" visible="1" text="With this network, image templates will be loaded from ../templates/Image.data and the user must categorize the image by clicking on the proper template button [A-Z,0-9]."/> + <Note x="727" y="381" visible="1" text="Once all templates are categorized, input and output vectors (sets) are written to disk (../templates/train_in_172_v2.data, ../templates/train_out_172_v2.data). They are used to train the Artificial Neural Network. "/> </Network> <Network type="iterator" name="LOOP0"> *************** *** 82,88 **** <Parameter name="PROBE_NAME" type="string" value="CLICK_FORWARD_FOR_NEXT_TEMPLATE" description=""/> </Node> ! <Node name="node_Smaller_1" type="Smaller" x="204.000000" y="-80.000000"/> ! <Node name="node_IterCount_1" type="IterCount" x="-45.000000" y="-90.000000"/> ! <Node name="node_Constant_1" type="Constant" x="57.000000" y="-45.000000"> <Parameter name="VALUE" type="int" value="1289" description=""/> </Node> --- 84,90 ---- <Parameter name="PROBE_NAME" type="string" value="CLICK_FORWARD_FOR_NEXT_TEMPLATE" description=""/> </Node> ! <Node name="node_Smaller_1" type="Smaller" x="162.000000" y="254.000000"/> ! <Node name="node_IterCount_1" type="IterCount" x="-87.000000" y="244.000000"/> ! <Node name="node_Constant_1" type="Constant" x="15.000000" y="289.000000"> <Parameter name="VALUE" type="int" value="1289" description=""/> </Node> *************** *** 102,106 **** <Parameter name="SPACING" type="int" value="10" description=""/> </Node> ! <Node name="node_Print_1" type="Print" x="49.000000" y="-89.000000"/> <Node name="node_NilObject_1" type="NilObject" x="-484.000000" y="446.000000"/> <Node name="node_NilObject_2" type="NilObject" x="-75.000000" y="468.000000"/> --- 104,108 ---- <Parameter name="SPACING" type="int" value="10" description=""/> </Node> ! <Node name="node_Print_1" type="Print" x="7.000000" y="245.000000"/> <Node name="node_NilObject_1" type="NilObject" x="-484.000000" y="446.000000"/> <Node name="node_NilObject_2" type="NilObject" x="-75.000000" y="468.000000"/> *************** *** 132,135 **** --- 134,140 ---- <NetOutput name="ACCUM_IN" node="node_Accumulate_1" terminal="OUTPUT" object_type="any" description="No description available"/> <NetOutput name="ACCUM_OUT" node="node_Accumulate_2" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="-326" y="350" visible="1" text="Be patient, 1289 templates need to be categorized!"/> + <Note x="393" y="442" visible="1" text="Templates will be processed in the PROCESS_TEMPLATE network"/> + <Note x="-595" y="735" visible="1" text="SymbolKeypad will display a simple GUI to allow the user to select which template is displayed in the ImageProbe."/> </Network> <Network type="subnet" name="PROCESS_TEMPLATE"> *************** *** 146,150 **** <Parameter name="CHANNEL" type="int" value="1" description=""/> </Node> ! <Node name="node_Constant_1" type="Constant" x="-229.000000" y="53.000000"> <Parameter name="VALUE" type="int" value="0" description=""/> </Node> --- 151,155 ---- <Parameter name="CHANNEL" type="int" value="1" description=""/> </Node> ! <Node name="node_Constant_1" type="Constant" x="-174.000000" y="-14.000000"> <Parameter name="VALUE" type="int" value="0" description=""/> </Node> *************** *** 168,177 **** <Link from="node_Scale_1" output="OUTPUT" to="node_ScalePrint_1" input="INPUT"/> <Link from="node_ScalePrint_1" output="OUTPUT" to="node_Concat_1" input="INPUT1"/> - <Link from="node_EXTRA_INFO_1" output="OUTPUT" to="node_Concat_1" input="INPUT2"/> <Link from="node_SymbolExtractor_1" output="SYMBOL" to="node_EXTRA_INFO_1" input="INPUT"/> <Link from="node_Binarize_1" output="IMAGE_OUT" to="node_Components_1" input="IMAGE"/> <NetInput name="IMAGE" node="node_NOP_1" terminal="INPUT" object_type="any" description="No description available"/> <NetInput name="LOOKUP" node="node_Components_1" terminal="LOOKUP" object_type="any" description="No description available"/> <NetOutput name="NNET_INPUT" node="node_Concat_1" terminal="OUTPUT" object_type="any" description="No description available"/> </Network> <Network type="subnet" name="STAT_ANALYSIS"> --- 173,185 ---- <Link from="node_Scale_1" output="OUTPUT" to="node_ScalePrint_1" input="INPUT"/> <Link from="node_ScalePrint_1" output="OUTPUT" to="node_Concat_1" input="INPUT1"/> <Link from="node_SymbolExtractor_1" output="SYMBOL" to="node_EXTRA_INFO_1" input="INPUT"/> <Link from="node_Binarize_1" output="IMAGE_OUT" to="node_Components_1" input="IMAGE"/> + <Link from="node_EXTRA_INFO_1" output="OUTPUT" to="node_Concat_1" input="INPUT2"/> <NetInput name="IMAGE" node="node_NOP_1" terminal="INPUT" object_type="any" description="No description available"/> <NetInput name="LOOKUP" node="node_Components_1" terminal="LOOKUP" object_type="any" description="No description available"/> <NetOutput name="NNET_INPUT" node="node_Concat_1" terminal="OUTPUT" object_type="any" description="No description available"/> + <Note x="-693" y="125" visible="1" text="Binarization of the image with an adaptative threshold"/> + <Note x="-235" y="175" visible="1" text="Black and white color components are extracted. We consider that the biggest black color blob is our symbol (which is the case in all our templates)."/> + <Note x="218" y="174" visible="1" text="The template is then scaled (13x13) and stored in the input vector with extra ratios calculated in the EXTRA_INFO subnet."/> </Network> <Network type="subnet" name="STAT_ANALYSIS"> *************** *** 193,247 **** <Network type="subnet" name="EXTRA_INFO"> <Node name="node_Div_1" type="Div" x="-212.000000" y="133.000000"/> ! <Node name="node_INT_TO_FLOAT_1" type="INT_TO_FLOAT" x="-405.000000" y="126.000000"/> ! <Node name="node_INT_TO_FLOAT_2" type="INT_TO_FLOAT" x="-404.000000" y="141.000000"/> ! <Node name="node_Concatenate_1" type="Concatenate" x="196.000000" y="143.000000"/> ! <Node name="node_INT_TO_FLOAT_3" type="INT_TO_FLOAT" x="-410.000000" y="168.000000"/> ! <Node name="node_INT_TO_FLOAT_4" type="INT_TO_FLOAT" x="-410.000000" y="187.000000"/> ! <Node name="node_Div_2" type="Div" x="-213.000000" y="173.000000"/> ! <Node name="node_Concatenate_2" type="Concatenate" x="49.000000" y="169.000000"/> <Node name="node_Div_3" type="Div" x="-212.000000" y="214.000000"/> ! <Node name="node_Float2Vect_1" type="Float2Vect" x="-126.000000" y="134.000000"> ! <Parameter name="LOOKAHEAD" type="int" value="" description=""/> ! <Parameter name="LOOKBACK" type="int" value="" description=""/> ! </Node> ! <Node name="node_Float2Vect_2" type="Float2Vect" x="-126.000000" y="173.000000"> ! <Parameter name="LOOKAHEAD" type="int" value="" description=""/> ! <Parameter name="LOOKBACK" type="int" value="" description=""/> ! </Node> ! <Node name="node_Float2Vect_3" type="Float2Vect" x="-127.000000" y="213.000000"> ! <Parameter name="LOOKAHEAD" type="int" value="" description=""/> ! <Parameter name="LOOKBACK" type="int" value="" description=""/> ! </Node> ! <Node name="node_NOP_1" type="NOP" x="-820.000000" y="154.000000"/> <Node name="node_RectAnalyser_1" type="RectAnalyser" x="-743.000000" y="155.000000"/> ! <Link from="node_INT_TO_FLOAT_1" output="FLOAT" to="node_Div_1" input="NUM"/> ! <Link from="node_INT_TO_FLOAT_2" output="FLOAT" to="node_Div_1" input="DEN"/> ! <Link from="node_RectAnalyser_1" output="HEIGHT" to="node_INT_TO_FLOAT_1" input="INT"/> ! <Link from="node_RectAnalyser_1" output="WIDTH" to="node_INT_TO_FLOAT_2" input="INT"/> ! <Link from="node_Float2Vect_1" output="OUTPUT" to="node_Concatenate_1" input="INPUT1"/> ! <Link from="node_Concatenate_2" output="OUTPUT" to="node_Concatenate_1" input="INPUT2">86 169 97 151 113 150.5 </Link> ! <Link from="node_RectAnalyser_1" output="X_RELATIVE_CENTER_OF_GRAVITY" to="node_INT_TO_FLOAT_3" input="INT"/> ! <Link from="node_RectAnalyser_1" output="Y_RELATIVE_CENTER_OF_GRAVITY" to="node_INT_TO_FLOAT_4" input="INT"/> ! <Link from="node_INT_TO_FLOAT_3" output="FLOAT" to="node_Div_2" input="NUM"/> ! <Link from="node_INT_TO_FLOAT_2" output="FLOAT" to="node_Div_2" input="DEN">-354 141 -322 139 -302 180 -266 180.5 </Link> ! <Link from="node_Float2Vect_2" output="OUTPUT" to="node_Concatenate_2" input="INPUT1"/> ! <Link from="node_Float2Vect_3" output="OUTPUT" to="node_Concatenate_2" input="INPUT2"/> ! <Link from="node_INT_TO_FLOAT_4" output="FLOAT" to="node_Div_3" input="NUM">-360 187 -292 209 -265 206.5 </Link> ! <Link from="node_INT_TO_FLOAT_1" output="FLOAT" to="node_Div_3" input="DEN">-355 126 -295 125 -285 189 -278 221 -265 221.5 </Link> ! <Link from="node_Div_1" output="OUTPUT" to="node_Float2Vect_1" input="INPUT"/> ! <Link from="node_Div_2" output="OUTPUT" to="node_Float2Vect_2" input="INPUT"/> ! <Link from="node_Div_3" output="OUTPUT" to="node_Float2Vect_3" input="INPUT"/> <Link from="node_NOP_1" output="OUTPUT" to="node_RectAnalyser_1" input="CRECT"/> <NetInput name="INPUT" node="node_NOP_1" terminal="INPUT" object_type="any" description="No description available"/> ! <NetOutput name="OUTPUT" node="node_Concatenate_1" terminal="OUTPUT" object_type="any" description="No description available"/> ! </Network> ! <Network type="subnet" name="INT_TO_FLOAT"> ! <Node name="node_Constant_1" type="Constant" x="-393.000000" y="147.000000"> ! <Parameter name="VALUE" type="float" value="0" description=""/> ! </Node> ! <Node name="node_Add_1" type="Add" x="-155.000000" y="140.000000"/> ! <Link from="node_Constant_1" output="VALUE" to="node_Add_1" input="INPUT2"/> ! <NetInput name="INT" node="node_Add_1" terminal="INPUT1" object_type="any" description="No description available"/> ! <NetOutput name="FLOAT" node="node_Add_1" terminal="OUTPUT" object_type="any" description="No description available"/> </Network> </Document> --- 201,224 ---- <Network type="subnet" name="EXTRA_INFO"> <Node name="node_Div_1" type="Div" x="-212.000000" y="133.000000"/> ! <Node name="node_Div_2" type="Div" x="-212.000000" y="176.000000"/> <Node name="node_Div_3" type="Div" x="-212.000000" y="214.000000"/> ! <Node name="node_NOP_1" type="NOP" x="-867.000000" y="154.000000"/> <Node name="node_RectAnalyser_1" type="RectAnalyser" x="-743.000000" y="155.000000"/> ! <Node name="node_Concat_1" type="Concat" x="11.000000" y="183.000000"/> ! <Node name="node_Concat_2" type="Concat" x="164.000000" y="140.000000"/> <Link from="node_NOP_1" output="OUTPUT" to="node_RectAnalyser_1" input="CRECT"/> + <Link from="node_RectAnalyser_1" output="HEIGHT" to="node_Div_1" input="NUM"/> + <Link from="node_RectAnalyser_1" output="HEIGHT" to="node_Div_3" input="DEN">-481 125 -405 126 -406 222 -266 221.5 </Link> + <Link from="node_RectAnalyser_1" output="WIDTH" to="node_Div_1" input="DEN"/> + <Link from="node_RectAnalyser_1" output="WIDTH" to="node_Div_2" input="DEN">-483.5 140 -397 140 -396 183 -266 183.5 </Link> + <Link from="node_RectAnalyser_1" output="X_RELATIVE_CENTER_OF_GRAVITY" to="node_Div_2" input="NUM"/> + <Link from="node_RectAnalyser_1" output="Y_RELATIVE_CENTER_OF_GRAVITY" to="node_Div_3" input="NUM">-482 185 -438 185 -398 206 -266 206.5 </Link> + <Link from="node_Concat_1" output="OUTPUT" to="node_Concat_2" input="INPUT2"/> + <Link from="node_Div_1" output="OUTPUT" to="node_Concat_2" input="INPUT1"/> + <Link from="node_Div_2" output="OUTPUT" to="node_Concat_1" input="INPUT1"/> + <Link from="node_Div_3" output="OUTPUT" to="node_Concat_1" input="INPUT2"/> <NetInput name="INPUT" node="node_NOP_1" terminal="INPUT" object_type="any" description="No description available"/> ! <NetOutput name="OUTPUT" node="node_Concat_2" terminal="OUTPUT" object_type="any" description="Result of the concatenation"/> ! <Note x="-217" y="410" visible="1" text="We compute 3 more ratios : HEIGHT / WIDTH X_cog / WIDTH Y_cog / HEIGHT And we store the result into a vector"/> </Network> </Document> |
From: Dominic L. <ma...@us...> - 2004-11-02 15:48:03
|
Update of /cvsroot/robotflow/RobotFlow In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28867 Modified Files: RobotFlow.spec.in configure.in Log Message: detecting MARIE version before compiling Index: RobotFlow.spec.in =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/RobotFlow.spec.in,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RobotFlow.spec.in 23 Jul 2004 17:20:52 -0000 1.4 --- RobotFlow.spec.in 2 Nov 2004 15:47:47 -0000 1.5 *************** *** 46,51 **** --mandir=%{_mandir} \ --sysconfdir=%{_sysconfdir} \ ! --disable-static \ ! --disable-MARIE %{__make} --- 46,50 ---- --mandir=%{_mandir} \ --sysconfdir=%{_sysconfdir} \ ! --disable-static %{__make} Index: configure.in =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/configure.in,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** configure.in 26 Aug 2004 12:11:39 -0000 1.46 --- configure.in 2 Nov 2004 15:47:47 -0000 1.47 *************** *** 5,9 **** AC_INIT(Generic/include/Timer.h) ! #AC_INIT([RobotFlow], [0.2.3cvs], [rob...@li...]) ROBOTFLOW_MAJOR_VERSION=0 --- 5,9 ---- AC_INIT(Generic/include/Timer.h) ! #AC_INIT([RobotFlow], [0.2.4cvs], [rob...@li...]) ROBOTFLOW_MAJOR_VERSION=0 *************** *** 75,78 **** --- 75,85 ---- dnl overflow-config test (Yannick Brosseau & Dominic Letourneau) + AC_PATH_PROG(AWK_PROG,awk,no,$PATH:$prefix/bin) + if test "$AWK_PROG" = no; then + AC_MSG_ERROR(awk is required to configure RobotFlow properly, please install it and try again.) + exit + fi + + AC_PATH_PROG(OVERFLOW_CONFIG,flowdesigner-config,no,$PATH:$FLOWDESIGNER_HOME/bin:$prefix/bin) if test "$OVERFLOW_CONFIG" = no; then *************** *** 156,183 **** AC_MSG_RESULT("MARIE disabled by user") else - # dnl Test for ACE (Yannick Brosseau & Dominic Letourneau) - # AC_MSG_CHECKING(for ACE) - # ACE_FOUND="" - # - # AC_ARG_WITH(ACE, [ --with-ACE Where ACE is installed (/usr/local)], ACE_DIR="$withval") - # - # dnl test which ACE_DIR, std way - # if test -n "$ACE_DIR"; then - # ACE_LIBS="-L$ACE_DIR/lib -lACE" - # ACE_INCLUDES="-I$ACE_DIR/include" - # AC_MSG_RESULT("found ACE_wrappers in $ACE_DIR") - # ACE_FOUND="yes" - # fi - # - # dnl test with ACE_ROOT - # if test -z "$ACE_FOUND" && test -n "$ACE_ROOT"; then - # dnl Now attempting in a ACE_wrappers style. - # AC_MSG_RESULT("found ACE_wrappers in $ACE_ROOT") - # ACE_LIBS="-L$ACE_ROOT/ace -lACE" - # ACE_INCLUDES="-I$ACE_ROOT" - # ACE_FOUND="yes" - # fi - - AC_ARG_WITH(MARIE, [ --with-MARIE Where MARIE is installed (/usr/local)], MARIE_DIR="$withval") --- 163,166 ---- *************** *** 204,208 **** dnl set WITH_MARIE if MARIE is found if test -n "$MARIE_FOUND"; then ! AM_CONDITIONAL(WITH_MARIE,true) else AM_CONDITIONAL(WITH_MARIE,false) --- 187,205 ---- dnl set WITH_MARIE if MARIE is found if test -n "$MARIE_FOUND"; then ! ! #check for marie version ! MARIE_VERSION=`$MARIE_CONFIG --version | awk '{print $2}'` ! ! MARIE_MAJOR=`echo "$MARIE_VERSION" | awk -F"." '{print $1}'` ! MARIE_MINOR=`echo "$MARIE_VERSION" | awk -F"." '{print $2}'` ! ! if test $MARIE_MAJOR -ge 0 -a $MARIE_MINOR -ge 2; then ! AC_MSG_RESULT([Using MARIE version : $MARIE_VERSION]) ! AM_CONDITIONAL(WITH_MARIE,true) ! else ! AC_MSG_RESULT([A newer version of MARIE required (>= 0.2.0), found version : $MARIE_VERSION]) ! AC_MSG_RESULT(Disabling MARIE support.) ! AM_CONDITIONAL(WITH_MARIE,false) ! fi else AM_CONDITIONAL(WITH_MARIE,false) |
From: Dominic L. <ma...@us...> - 2004-11-02 15:48:03
|
Update of /cvsroot/robotflow/RobotFlow/Behaviors/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28867/Behaviors/src Modified Files: MultiSignTracking.cc Log Message: detecting MARIE version before compiling Index: MultiSignTracking.cc =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Behaviors/src/MultiSignTracking.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MultiSignTracking.cc 16 Aug 2004 19:43:43 -0000 1.2 --- MultiSignTracking.cc 2 Nov 2004 15:47:47 -0000 1.3 *************** *** 263,266 **** --- 263,269 ---- y_boundary = min(y_boundary,y_value); + cerr<<"Width : "<<my_rect->Width()<<endl; + cerr<<"Height : "<<my_rect->Height()<<endl; + //verify if symbols are big enough if (my_rect->Width() < m_minWidth || my_rect->Height() < m_minHeight) { |
From: Dominic L. <ma...@us...> - 2004-11-02 15:48:03
|
Update of /cvsroot/robotflow/RobotFlow/demo/SymbolRecog/n-files In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28867/demo/SymbolRecog/n-files Modified Files: SymbolTracking.n Log Message: detecting MARIE version before compiling Index: SymbolTracking.n =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/demo/SymbolRecog/n-files/SymbolTracking.n,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** SymbolTracking.n 26 Aug 2004 15:13:26 -0000 1.6 --- SymbolTracking.n 2 Nov 2004 15:47:48 -0000 1.7 *************** *** 31,34 **** --- 31,35 ---- <NetOutput name="REL_TILT" node="node_MAIN_LOOP_1" terminal="REL_TILT" object_type="" description="The output object = input object"/> <NetOutput name="ABS_ZOOM" node="node_MAIN_LOOP_1" terminal="ABS_ZOOM" object_type="" description="The output object = input object"/> + <NetOutput name="READING_FLAG" node="node_MAIN_LOOP_1" terminal="READING_FLAG" object_type="any" description="No description available"/> <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.8.1"/> </Network> *************** *** 44,47 **** --- 45,49 ---- <Parameter name="CONTINUOUS" type="bool" value="true" description="Continuously grab images "/> <Parameter name="WAIT_REPLY" type="bool" value="false" description="Wait for camera reply on commands"/> + <Parameter name="INQUIRY_POSITION" type="bool" value="false" description="Inquiry position of the pan,tilt,zoom from the device"/> </Node> <Node name="node_RGB242RGB15_1" type="RGB242RGB15" x="-525.000000" y="245.000000"/> *************** *** 88,91 **** --- 90,109 ---- <Parameter name="SKIP_N" type="int" value="15" description="The value"/> </Node> + <Node name="node_ComponentsViewer_1" type="ComponentsViewer" x="-79.000000" y="388.000000"/> + <Node name="node_NOP_4" type="NOP" x="-558.000000" y="372.000000"/> + <Node name="node_Components_1" type="Components" x="-351.000000" y="396.000000"> + <Parameter name="XGAP" type="int" value="3" description="max X distance between two pixels of the same color blob."/> + <Parameter name="YGAP" type="int" value="3" description="max Y distance between two pixels of the same color blob."/> + <Parameter name="NUM_COLOR" type="int" value="5" description="Number of color to extract."/> + <Parameter name="MIN_AREA" type="int" value="16" description="minimum area of color blocs"/> + </Node> + <Node name="node_ImageProbe_1" type="ImageProbe" x="222.000000" y="398.000000"> + <Parameter name="HEIGHT" type="int" value="240" description="The height of the image"/> + <Parameter name="WIDTH" type="int" value="320" description="The width of the image"/> + <Parameter name="BREAK_AT" type="int" value="" description="No description available"/> + <Parameter name="SHOW" type="bool" value="true" description="No description available"/> + <Parameter name="SKIP" type="int" value="" description="No description available"/> + </Node> + <Node name="node_NilObject_3" type="NilObject" x="-22.000000" y="414.000000"/> <Link from="node_SNCRZ30_1" output="ZOOM_POSITION" to="node_READ_1" input="CURRENT_ABS_ZOOM"/> <Link from="node_NilObject_1" output="VALUE" to="node_SNCRZ30_1" input="TILT_ABS_POS"/> *************** *** 112,115 **** --- 130,140 ---- <Link from="node_READ_1" output="REL_TILT_COMMAND" to="node_SKIP_N_2" input="INPUT"/> <Link from="node_READ_1" output="ABS_ZOOM_COMMAND" to="node_SKIP_N_3" input="INPUT"/> + <Link from="node_NOP_4" output="OUTPUT" to="node_READ_1" input="COLOR_LOOKUP"/> + <Link from="node_Components_1" output="BLOBS" to="node_ComponentsViewer_1" input="DATA"/> + <Link from="node_NOP_4" output="OUTPUT" to="node_Components_1" input="LOOKUP"/> + <Link from="node_RGB242RGB15_1" output="RGB15_IMAGE" to="node_Components_1" input="IMAGE"/> + <Link from="node_NOP_4" output="OUTPUT" to="node_ComponentsViewer_1" input="LOOKUP"/> + <Link from="node_ComponentsViewer_1" output="IMAGE" to="node_ImageProbe_1" input="INPUT"/> + <Link from="node_NilObject_3" output="VALUE" to="node_ImageProbe_1" input="SAVE_FILENAME"/> <NetCondition name="CONDITION" node="node_Constant_1" terminal="VALUE"/> <NetInput name="BLACK_WHITE_LOOKUP" node="node_READ_1" terminal="BLACK_WHITE_LOOKUP" object_type="any" description="No description available"/> *************** *** 117,121 **** <NetInput name="DICT" node="node_READ_1" terminal="DICT" object_type="any" description="No description available"/> <NetInput name="SIGN_TRACKING_ACTIVATED" node="node_READ_1" terminal="SIGN_TRACKING_ACTIVATED" object_type="any" description="No description available"/> - <NetInput name="COLOR_LOOKUP" node="node_READ_1" terminal="COLOR_LOOKUP" object_type="any" description="No description available"/> <NetOutput name="SENTENCE" node="node_TextProbe_1" terminal="OUTPUT" object_type="any" description="Pass through"/> <NetOutput name="ORIGINAL_TEXT" node="node_TextProbe_2" terminal="OUTPUT" object_type="any" description="Pass through"/> --- 142,145 ---- *************** *** 123,126 **** --- 147,153 ---- <NetOutput name="REL_TILT" node="node_Feedback_1" terminal="OUTPUT" object_type="any" description="The output object = input object"/> <NetOutput name="ABS_ZOOM" node="node_Feedback_3" terminal="OUTPUT" object_type="any" description="The output object = input object"/> + <NetOutput name="READING_FLAG" node="node_READ_1" terminal="READING_FLAG" object_type="any" description="No description available"/> + <NetInput name="COLOR_LOOKUP" node="node_NOP_4" terminal="INPUT" object_type="any" description="The input"/> + <NetOutput name="COMPONENTS" node="node_ImageProbe_1" terminal="OUTPUT" object_type="any" description="No description available"/> <Note x="0" y="0" visible="0" text="Created with FlowDesigner 0.8.1"/> </Network> |
From: Dominic L. <ma...@us...> - 2004-11-02 14:10:19
|
Update of /cvsroot/robotflow/RobotFlow/MARIE/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8760 Modified Files: extractMarieDataIR.cpp extractMarieDataSonar.cpp Log Message: fixed addInput / addOutput cut&paste problems Index: extractMarieDataIR.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieDataIR.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** extractMarieDataIR.cpp 29 Oct 2004 14:07:20 -0000 1.1 --- extractMarieDataIR.cpp 2 Nov 2004 14:10:05 -0000 1.2 *************** *** 73,77 **** //outputs ! m_rangesID = addInput("RANGES"); } --- 73,77 ---- //outputs ! m_rangesID = addOutput("RANGES"); } Index: extractMarieDataSonar.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieDataSonar.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** extractMarieDataSonar.cpp 28 Oct 2004 20:30:07 -0000 1.1 --- extractMarieDataSonar.cpp 2 Nov 2004 14:10:05 -0000 1.2 *************** *** 73,77 **** //outputs ! m_rangesID = addInput("RANGES"); } --- 73,77 ---- //outputs ! m_rangesID = addOutput("RANGES"); } |
From: Carle C. <car...@us...> - 2004-11-01 18:52:45
|
Update of /cvsroot/robotflow/RobotFlow/MARIE/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26554 Modified Files: extractMarieDataLaser.cpp extractMarieDataMap.cpp Log Message: correct cut&paste error defining Input output Ports Index: extractMarieDataMap.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieDataMap.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** extractMarieDataMap.cpp 28 Oct 2004 20:30:07 -0000 1.1 --- extractMarieDataMap.cpp 1 Nov 2004 18:52:30 -0000 1.2 *************** *** 74,78 **** //outputs ! m_compositeID = addInput("COMPOSITE"); } --- 74,78 ---- //outputs ! m_compositeID = addOutput("COMPOSITE"); } Index: extractMarieDataLaser.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/extractMarieDataLaser.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** extractMarieDataLaser.cpp 28 Oct 2004 20:30:07 -0000 1.1 --- extractMarieDataLaser.cpp 1 Nov 2004 18:52:30 -0000 1.2 *************** *** 73,77 **** //outputs ! m_rangesID = addInput("RANGES"); } --- 73,77 ---- //outputs ! m_rangesID = addOutput("RANGES"); } |
From: Dominic L. <ma...@us...> - 2004-11-01 13:20:14
|
Update of /cvsroot/robotflow/RobotFlow/MARIE/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19501 Modified Files: Makefile.am Added Files: isMarieDataNull.cpp Log Message: added isMarieDataNull Index: Makefile.am =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/Makefile.am,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Makefile.am 29 Oct 2004 14:07:19 -0000 1.22 --- Makefile.am 1 Nov 2004 13:20:05 -0000 1.23 *************** *** 52,56 **** extractMarieCommandCamera.cpp \ extractMarieCommandMotor.cpp \ ! extractMarieCommandJoystick.cpp install-data-local: --- 52,57 ---- extractMarieCommandCamera.cpp \ extractMarieCommandMotor.cpp \ ! extractMarieCommandJoystick.cpp \ ! isMarieDataNull.cpp install-data-local: --- NEW FILE: isMarieDataNull.cpp --- #include "BufferedNode.h" #include "MarieDataNull.h" namespace marie { class isMarieDataNull; DECLARE_NODE(isMarieDataNull) /*Node * @name isMarieDataNull * @category RobotFlow:MARIE:LOGIC * @description Verify if we have a MarieDataNull Object. * * @input_name INPUT * @input_type any * @input_description any Input to verify * * @output_name OUTPUT * @output_type bool * @output_description True if we have a MarieDataNull Object, else false. * END*/ class isMarieDataNull : public BufferedNode { //inputs int m_inputID; //outputs int m_outputID; public: isMarieDataNull(string nodeName, ParameterSet params) : BufferedNode(nodeName, params) { //inputs m_inputID = addInput("INPUT"); //outputs m_outputID = addOutput("OUTPUT"); } void calculate(int output_id, int count, Buffer &out) { try { ObjectRef inputValue = getInput(m_inputID,count); MarieDataNull *dataNullPtr = dynamic_cast<MarieDataNull*>(inputValue.get()); //verify if we have a valid object if (dataNullPtr) { out[count] = ObjectRef(Bool::alloc(true)); } else { out[count] = ObjectRef(Bool::alloc(false)); } } catch (BaseException *e) { e->print(cerr); throw e->add(new GeneralException("Error in isMarieDataNull",__FILE__,__LINE__)); } }//calculate }; }//namespace marie |
Update of /cvsroot/robotflow/RobotFlow/MARIE/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21308 Modified Files: Makefile.am MarieCommandBehavior.cpp MarieCommandCamera.cpp MarieCommandJoystick.cpp MarieCommandMotor.cpp MarieDataBumper.cpp MarieDataCamera.cpp MarieDataIR.cpp MarieDataLaser.cpp MarieDataMap.cpp MarieDataOdometry.cpp MarieDataRaw.cpp MarieDataSonar.cpp MarieRequestSystem.cpp newMarieCommandCamera.cpp newMarieRequestSystem.cpp Added Files: extractMarieDataBumper.cpp extractMarieDataIR.cpp extractMarieDataRaw.cpp extractMarieRequestSystem.cpp newMarieDataBumper.cpp newMarieDataIR.cpp newMarieDataRaw.cpp Log Message: finished splitting objects, deprecated old nodes --- NEW FILE: extractMarieDataIR.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieDataIR.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class extractMarieDataIR; DECLARE_NODE(extractMarieDataIR) /*Node * * @name extractMarieDataIR * @category RobotFlow:MARIE:DATA * @description Extract data in the FlowDesigner format from MarieDataIR * * @input_name DATA_IR * @input_type MarieDataIR * @input_description MarieDataIR object * * @output_name RANGES * @output_description Range contained in the MarieDataIR object * @output_type Vector<int> * END*/ using namespace std; class extractMarieDataIR : public BufferedNode { private: //intputs int m_dataIRID; //outputs int m_rangesID; public: extractMarieDataIR(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_dataIRID = addInput("DATA_IR"); //outputs m_rangesID = addInput("RANGES"); } void calculate(int output_id, int count, Buffer &out) { try { //get input RCPtr<MarieDataIR> data = getInput(m_dataIRID,count); unsigned int size = data->getNbIR(); const unsigned int *ranges = data->getRanges(); //copy range data into a vector Vector<int> *vect = Vector<int>::alloc(size); for (unsigned int i = 0; i < size; i++) { (*vect)[i] = (int) ranges[i]; } //output vector out[count] = ObjectRef(vect); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class extractMarieDataIR }//namespace marie --- NEW FILE: extractMarieDataBumper.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieDataBumper.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class extractMarieDataBumper; DECLARE_NODE(extractMarieDataBumper) /*Node * * @name extractMarieDataBumper * @category RobotFlow:MARIE:DATA * @description Extract data in the FlowDesigner format from MarieDataBumper * * @input_name DATA_BUMPER * @input_type Input MarieDataBumper * @input_description input DataBumper, nilObject if not used * * @output_name NBBUMPERS * @output_type int * @output_description output nb buttons, nilObject if not used * * @output_name BUMPERSTATE * @output_type int * @output_description output bumper state, nilObject if not used * END*/ using namespace std; class extractMarieDataBumper : public BufferedNode { private: //inputs int m_dataBumperInID; //outputs int m_nbBumpersOutID; int m_bumperStateOutID; public: extractMarieDataBumper(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_dataBumperInID = addInput("DATA_BUMPER"); //outputs m_nbBumpersOutID = addOutput("NBBUMPERS"); m_bumperStateOutID = addOutput("BUMPERSTATE"); } void calculate(int output_id, int count, Buffer &out) { try { //get input RCPtr<MarieDataBumper> data = getInput(m_dataBumperInID,count); //output data (*outputs[m_nbBumpersOutID].buffer)[count] = ObjectRef(Int::alloc(data->getNbBumpers())); (*outputs[m_bumperStateOutID].buffer)[count] = ObjectRef(Int::alloc(data->getBumperState())); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class extractMarieDataBumper }//namespace marie Index: MarieDataSonar.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataSonar.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MarieDataSonar.cpp 10 Jun 2004 20:47:53 -0000 1.3 --- MarieDataSonar.cpp 29 Oct 2004 14:07:20 -0000 1.4 *************** *** 31,35 **** * * @name MarieDataSonar ! * @category RobotFlow:MARIE:DATA * @description Save an object * --- 31,35 ---- * * @name MarieDataSonar ! * @category RobotFlow:MARIE:zdeprecated * @description Save an object * Index: MarieCommandBehavior.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieCommandBehavior.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarieCommandBehavior.cpp 31 May 2004 14:10:09 -0000 1.2 --- MarieCommandBehavior.cpp 29 Oct 2004 14:07:20 -0000 1.3 *************** *** 33,37 **** * * @name MarieCommandBehavior ! * @category RobotFlow:MARIE:COMMAND * @description Save an object * --- 33,37 ---- * * @name MarieCommandBehavior ! * @category RobotFlow:MARIE:zdeprecated * @description Save an object * Index: MarieDataOdometry.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataOdometry.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MarieDataOdometry.cpp 10 Jun 2004 20:47:53 -0000 1.3 --- MarieDataOdometry.cpp 29 Oct 2004 14:07:20 -0000 1.4 *************** *** 30,34 **** * * @name MarieDataOdometry ! * @category RobotFlow:MARIE:DATA * @description Read content of MarieDataOdometry * --- 30,34 ---- * * @name MarieDataOdometry ! * @category RobotFlow:MARIE:zdeprecated * @description Read content of MarieDataOdometry * Index: MarieDataCamera.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataCamera.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MarieDataCamera.cpp 10 Jun 2004 20:47:53 -0000 1.3 --- MarieDataCamera.cpp 29 Oct 2004 14:07:20 -0000 1.4 *************** *** 31,35 **** * * @name MarieDataCamera ! * @category RobotFlow:MARIE:DATA * @description Save an object * --- 31,35 ---- * * @name MarieDataCamera ! * @category RobotFlow:MARIE:zdeprecated * @description Save an object * Index: MarieCommandJoystick.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieCommandJoystick.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MarieCommandJoystick.cpp 4 Aug 2004 17:49:50 -0000 1.2 --- MarieCommandJoystick.cpp 29 Oct 2004 14:07:20 -0000 1.3 *************** *** 31,35 **** * * @name MarieCommandJoystick ! * @category RobotFlow:MARIE:COMMAND * @description Read & Create MarieCommandJoystick data object * --- 31,35 ---- * * @name MarieCommandJoystick ! * @category RobotFlow:MARIE:zdeprecated * @description Read & Create MarieCommandJoystick data object * --- NEW FILE: extractMarieRequestSystem.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include "MarieRequestSystem.h" #include <sstream> #include <string> namespace marie { class extractMarieRequestSystem; DECLARE_NODE(extractMarieRequestSystem) /*Node * * @name extractMarieRequestSystem * @category RobotFlow:MARIE:REQUEST * @description Extract MARIE request system information * * @input_name REQUEST_SYSTEM * @input_type MarieRequestSystem * @input_description MarieRequestSystem Object * * @output_name COMMAND * @output_description Command stored in the Request System * @output_type string * * @output_name DATA * @output_description Data stored in the Request System * @output_type string * * @output_name REQUEST_ID * @output_description Request ID stored in the Request System * @output_type int * * @output_name STATE * @output_description State stored in the Request System * @output_type string * END*/ using namespace std; class extractMarieRequestSystem : public BufferedNode { private: //inputs int m_requestSystemID; //outputs int m_commandID; int m_dataID; int m_requestIDID; int m_stateID; public: extractMarieRequestSystem(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_requestSystemID = addInput("REQUEST_SYSTEM"); //outputs m_commandID = addOutput("COMMAND"); m_dataID = addOutput("DATA"); m_requestIDID = addOutput("REQUEST_ID"); m_stateID = addOutput("STATE"); } void calculate(int output_id, int count, Buffer &out) { try { //get input RCPtr<MarieRequestSystem> request = getInput(m_requestSystemID,count); (*outputs[m_commandID].buffer)[count] = ObjectRef(new String(request->getCommand())); (*outputs[m_dataID].buffer)[count] = ObjectRef(new String(request->getData())); (*outputs[m_requestIDID].buffer)[count] = ObjectRef(Int::alloc(request->getID())); (*outputs[m_stateID].buffer)[count] = ObjectRef(new String(request->getState())); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class extractMarieRequestSystem }//namespace marie Index: MarieDataBumper.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataBumper.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MarieDataBumper.cpp 4 Aug 2004 17:49:50 -0000 1.1 --- MarieDataBumper.cpp 29 Oct 2004 14:07:20 -0000 1.2 *************** *** 31,35 **** * * @name MarieDataBumper ! * @category RobotFlow:MARIE:DATA * @description Read & Create MarieDataBumper data object * --- 31,35 ---- * * @name MarieDataBumper ! * @category RobotFlow:MARIE:zdeprecated * @description Read & Create MarieDataBumper data object * --- NEW FILE: newMarieDataBumper.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieDataBumper.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class newMarieDataBumper; DECLARE_NODE(newMarieDataBumper) /*Node * * @name newMarieDataBumper * @category RobotFlow:MARIE:DATA * @description Create an object of type MarieDataBumper * * @input_name NBBUMPERS * @input_type int * @input_description input nb buttons, nilObject if not used * * @input_name BUMPERSTATE * @input_type int * @input_description input bumper state, nilObject if not used * * @output_name DATA_BUMPER * @output_type MarieDataBumper * @output_description Output DataBumper * END*/ using namespace std; class newMarieDataBumper : public BufferedNode { private: //inputs int m_nbBumpersInID; int m_bumperStateInID; //outputs int m_dataBumperOutID; public: newMarieDataBumper(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_nbBumpersInID = addInput("NBBUMPERS"); m_bumperStateInID = addInput("BUMPERSTATE"); //outputs m_dataBumperOutID = addOutput("DATA_BUMPER"); } void calculate(int output_id, int count, Buffer &out) { try { RCPtr<Int> nbBumpers = getInput(m_nbBumpersInID,count); RCPtr<Int> bumperState = getInput(m_bumperStateInID,count); MarieDataBumper *data = new MarieDataBumper(); //set the data data->setNbBumpers(*nbBumpers); data->setBumperState(*bumperState); //output object out[count] = ObjectRef(data); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class newMarieDataBumper }//namespace marie Index: newMarieRequestSystem.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieRequestSystem.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** newMarieRequestSystem.cpp 22 Sep 2004 20:45:55 -0000 1.3 --- newMarieRequestSystem.cpp 29 Oct 2004 14:07:20 -0000 1.4 *************** *** 31,35 **** * * @name newMarieRequestSystem ! * @category RobotFlow:MARIE:DATA * @description Create MARIE request system * --- 31,35 ---- * * @name newMarieRequestSystem ! * @category RobotFlow:MARIE:REQUEST * @description Create MARIE request system * *************** *** 86,122 **** void calculate(int output_id, int count, Buffer &out) { ! ! ObjectRef commandValue = getInput(m_commandID,count); ! ObjectRef dataValue = getInput(m_dataID,count); ! ObjectRef requestIDValue = getInput(m_requestIDID,count); ! ObjectRef stateValue = getInput(m_stateID,count); ! ! if (!commandValue->isNil() && ! !dataValue->isNil() && ! !requestIDValue->isNil() && ! !stateValue->isNil()) ! { ! MarieRequestSystem *request = new MarieRequestSystem(); ! ! RCPtr<String> commandString = commandValue; ! RCPtr<String> dataString = dataValue; ! RCPtr<Int> requestID = requestIDValue; ! RCPtr<String> stateString = stateValue; ! ! request->setCommand(*commandString); ! request->setData(*dataString); ! request->setID(*requestID); ! request->setState(*stateString); ! ! out[count] = ObjectRef(request); ! } ! else { ! out[count] = nilObject; } ! } ! };//class newMarieRequestSystem }//namespace marie --- 86,127 ---- void calculate(int output_id, int count, Buffer &out) { ! try { ! ObjectRef commandValue = getInput(m_commandID,count); ! ObjectRef dataValue = getInput(m_dataID,count); ! ObjectRef requestIDValue = getInput(m_requestIDID,count); ! ObjectRef stateValue = getInput(m_stateID,count); ! if (!commandValue->isNil() && ! !dataValue->isNil() && ! !requestIDValue->isNil() && ! !stateValue->isNil()) ! { ! ! MarieRequestSystem *request = new MarieRequestSystem(); ! ! RCPtr<String> commandString = commandValue; ! RCPtr<String> dataString = dataValue; ! RCPtr<Int> requestID = requestIDValue; ! RCPtr<String> stateString = stateValue; ! ! request->setCommand(*commandString); ! request->setData(*dataString); ! request->setID(*requestID); ! request->setState(*stateString); ! ! out[count] = ObjectRef(request); ! ! } ! else ! { ! out[count] = nilObject; ! } } ! catch(BaseException *e) { ! e->print(cerr); ! throw e->add(new GeneralException("",__FILE__,__LINE__)); } ! } };//class newMarieRequestSystem }//namespace marie Index: MarieDataIR.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataIR.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MarieDataIR.cpp 4 Aug 2004 17:49:50 -0000 1.1 --- MarieDataIR.cpp 29 Oct 2004 14:07:20 -0000 1.2 *************** *** 32,36 **** * * @name MarieDataIR ! * @category RobotFlow:MARIE:DATA * @description Save an object * --- 32,36 ---- * * @name MarieDataIR ! * @category RobotFlow:MARIE:zdeprecated * @description Save an object * --- NEW FILE: newMarieDataIR.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieDataIR.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class newMarieDataIR; DECLARE_NODE(newMarieDataIR) /*Node * * @name newMarieDataIR * @category RobotFlow:MARIE:DATA * @description Create an object of type MarieDataIR * * @input_name RANGES * @input_description Range to be transformed into a MarieDataIR object * @input_type Vector<int> * * @output_name DATA_IR * @output_type MarieDataIR * @output_description MarieDataIR object * END*/ using namespace std; class newMarieDataIR : public BufferedNode { private: //inputs int m_rangesID; //outputs int m_dataIRID; public: newMarieDataIR(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_rangesID = addInput("RANGES"); //outputs m_dataIRID = addOutput("DATA_IR"); } void calculate(int output_id, int count, Buffer &out) { try { RCPtr<Vector<int> > ranges = getInput(m_rangesID,count); MarieDataIR *data = new MarieDataIR(); data->setNbIR(ranges->size()); if (ranges->size() > 0) { data->setRanges((unsigned int*) &(*ranges)[0]); } //output result out[count] = ObjectRef(data); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class newMarieDataIR }//namespace marie Index: newMarieCommandCamera.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieCommandCamera.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** newMarieCommandCamera.cpp 28 Oct 2004 15:03:30 -0000 1.1 --- newMarieCommandCamera.cpp 29 Oct 2004 14:07:20 -0000 1.2 *************** *** 32,36 **** * * @name newMarieCommandCamera ! * @category RobotFlow:MARIE:DATA * @description Create MARIE DataCamera object * --- 32,36 ---- * * @name newMarieCommandCamera ! * @category RobotFlow:MARIE:COMMAND * @description Create MARIE DataCamera object * --- NEW FILE: newMarieDataRaw.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieDataRaw.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class newMarieDataRaw; DECLARE_NODE(newMarieDataRaw) /*Node * * @name newMarieDataRaw * @category RobotFlow:MARIE:DATA * @description Create an object of type MarieDataRaw * * @input_name OBJREF * @input_type MarieDataRaw * @input_description MarieDataRaw object * * @input_name CUSTOM_ID * @input_type MarieDataRaw * @input_description MarieDataRaw object * * @output_name DATA_RAW * @output_description Range contained in the MarieDataRaw object * @output_type MarieDataRaw * END*/ using namespace std; class newMarieDataRaw : public BufferedNode { private: //inputs int m_objRefInID; int m_customIDInID; //outputs int m_rawMarieOutID; public: newMarieDataRaw(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_objRefInID = addInput("OBJREF"); m_customIDInID = addInput("CUSTOM_ID"); //outputs m_rawMarieOutID = addOutput("DATA_RAW"); } void calculate(int output_id, int count, Buffer &out) { try { ObjectRef inputObject = getInput(m_objRefInID,count); RCPtr<String> customID = getInput(m_customIDInID,count); //output object in a temporary stream MarieDataRaw *dataRaw = new MarieDataRaw(); ostringstream tempStr; //printOn on the stream tempStr << inputObject; dataRaw->setRawData(tempStr.str()); dataRaw->setCustomID(*customID); //output result out[count] = ObjectRef(dataRaw); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class newMarieDataRaw }//namespace marie Index: MarieCommandCamera.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieCommandCamera.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MarieCommandCamera.cpp 31 Aug 2004 17:30:24 -0000 1.6 --- MarieCommandCamera.cpp 29 Oct 2004 14:07:20 -0000 1.7 *************** *** 32,36 **** * * @name MarieCommandCamera ! * @category RobotFlow:MARIE:COMMAND * @description Read & Create MarieCommandCamera data object * --- 32,36 ---- * * @name MarieCommandCamera ! * @category RobotFlow:MARIE:zdeprecated * @description Read & Create MarieCommandCamera data object * --- NEW FILE: extractMarieDataRaw.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieDataRaw.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class extractMarieDataRaw; DECLARE_NODE(extractMarieDataRaw) /*Node * * @name extractMarieDataRaw * @category RobotFlow:MARIE:DATA * @description Extract data in the FlowDesigner format from MarieDataRaw * * @input_name DATA_RAW * @input_type MarieDataRaw * @input_description MarieDataRaw object * * @output_name OBJREF * @output_description Range contained in the MarieDataRaw object * @output_type any * * @output_name DATA_RAW * @output_description Range contained in the MarieDataRaw object * @output_type MarieDataRaw * * @output_name CUSTOM_ID * @output_description Range contained in the MarieDataRaw object * @output_type string * END*/ using namespace std; class extractMarieDataRaw : public BufferedNode { private: //intputs int m_dataRawID; //outputs int m_objRefOutID; int m_customIDOutID; public: extractMarieDataRaw(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_dataRawID = addInput("DATA_RAW"); //outputs m_objRefOutID = addOutput("OBJREF"); m_customIDOutID = addOutput("CUSTOM_ID"); } void calculate(int output_id, int count, Buffer &out) { try { //get input RCPtr<MarieDataRaw> data = getInput(m_dataRawID,count); ObjectRef objRefOutValue = nilObject; //read raw data (FlowDesigner object) try { stringstream tempStr(data->getRawData()); tempStr >> objRefOutValue; } catch(BaseException *e) { e->print(cerr); delete e; objRefOutValue = nilObject; } //Output result (*outputs[m_objRefOutID].buffer)[count] = objRefOutValue; (*outputs[m_customIDOutID].buffer)[count] = ObjectRef(new String(data->getCustomID())); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class extractMarieDataRaw }//namespace marie Index: Makefile.am =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/Makefile.am,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Makefile.am 28 Oct 2004 20:30:07 -0000 1.21 --- Makefile.am 29 Oct 2004 14:07:19 -0000 1.22 *************** *** 31,34 **** --- 31,37 ---- newMarieDataCamera.cpp \ newMarieDataOdometry.cpp \ + newMarieDataRaw.cpp \ + newMarieDataIR.cpp \ + newMarieDataBumper.cpp \ newMarieDataMap.cpp \ newMarieRequestSystem.cpp \ *************** *** 37,49 **** newMarieCommandMotor.cpp \ newMarieCommandJoystick.cpp \ - extractMarieCommandBehavior.cpp \ - extractMarieCommandCamera.cpp \ - extractMarieCommandMotor.cpp \ - extractMarieCommandJoystick.cpp \ extractMarieDataLaser.cpp \ extractMarieDataSonar.cpp \ extractMarieDataCamera.cpp \ extractMarieDataOdometry.cpp \ ! extractMarieDataMap.cpp install-data-local: --- 40,56 ---- newMarieCommandMotor.cpp \ newMarieCommandJoystick.cpp \ extractMarieDataLaser.cpp \ extractMarieDataSonar.cpp \ extractMarieDataCamera.cpp \ extractMarieDataOdometry.cpp \ ! extractMarieDataRaw.cpp \ ! extractMarieDataIR.cpp \ ! extractMarieDataBumper.cpp \ ! extractMarieDataMap.cpp \ ! extractMarieRequestSystem.cpp \ ! extractMarieCommandBehavior.cpp \ ! extractMarieCommandCamera.cpp \ ! extractMarieCommandMotor.cpp \ ! extractMarieCommandJoystick.cpp install-data-local: Index: MarieCommandMotor.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieCommandMotor.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MarieCommandMotor.cpp 17 Jun 2004 17:37:30 -0000 1.4 --- MarieCommandMotor.cpp 29 Oct 2004 14:07:20 -0000 1.5 *************** *** 31,35 **** * * @name MarieCommandMotor ! * @category RobotFlow:MARIE:COMMAND * @description Save an object * --- 31,35 ---- * * @name MarieCommandMotor ! * @category RobotFlow:MARIE:zdeprecated * @description Save an object * Index: MarieDataMap.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataMap.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MarieDataMap.cpp 22 Sep 2004 13:55:53 -0000 1.1 --- MarieDataMap.cpp 29 Oct 2004 14:07:20 -0000 1.2 *************** *** 32,36 **** * * @name MarieDataMap ! * @category RobotFlow:MARIE:DATA * @description Read MARIE data maps * --- 32,36 ---- * * @name MarieDataMap ! * @category RobotFlow:MARIE:zdeprecated * @description Read MARIE data maps * Index: MarieDataRaw.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataRaw.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MarieDataRaw.cpp 11 Aug 2004 15:04:08 -0000 1.3 --- MarieDataRaw.cpp 29 Oct 2004 14:07:20 -0000 1.4 *************** *** 32,36 **** * * @name MarieDataRaw ! * @category RobotFlow:MARIE:DATA * @description Save an object * --- 32,36 ---- * * @name MarieDataRaw ! * @category RobotFlow:MARIE:zdeprecated * @description Save an object * Index: MarieDataLaser.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieDataLaser.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MarieDataLaser.cpp 10 Jun 2004 20:47:53 -0000 1.4 --- MarieDataLaser.cpp 29 Oct 2004 14:07:20 -0000 1.5 *************** *** 32,36 **** * * @name MarieDataLaser ! * @category RobotFlow:MARIE:DATA * @description Save an object * --- 32,36 ---- * * @name MarieDataLaser ! * @category RobotFlow:MARIE:zdeprecated * @description Save an object * Index: MarieRequestSystem.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/MarieRequestSystem.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MarieRequestSystem.cpp 22 Sep 2004 19:47:07 -0000 1.1 --- MarieRequestSystem.cpp 29 Oct 2004 14:07:20 -0000 1.2 *************** *** 31,35 **** * * @name MarieRequestSystem ! * @category RobotFlow:MARIE:DATA * @description Load an object of RequestSystem type * --- 31,35 ---- * * @name MarieRequestSystem ! * @category RobotFlow:MARIE:zdeprecated * @description Load an object of RequestSystem type * |
From: Dominic L. <ma...@us...> - 2004-10-28 20:30:20
|
Update of /cvsroot/robotflow/RobotFlow/MARIE/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20336 Modified Files: Makefile.am newMarieDataCamera.cpp Added Files: extractMarieDataCamera.cpp extractMarieDataLaser.cpp extractMarieDataMap.cpp extractMarieDataOdometry.cpp extractMarieDataSonar.cpp newMarieDataLaser.cpp newMarieDataOdometry.cpp newMarieDataSonar.cpp Log Message: added new blocks --- NEW FILE: extractMarieDataMap.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieDataMap.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" #include "CompositeType.h" namespace marie { //forward declaration class extractMarieDataMap; DECLARE_NODE(extractMarieDataMap) /*Node * * @name extractMarieDataMap * @category RobotFlow:MARIE:DATA * @description Extract data in the FlowDesigner format from MarieDataMap * * @input_name DATA_MAP * @input_type MarieDataMap * @input_description MarieDataMap object * * @output_name COMPOSITE * @output_description Composite object equivalent to MARIE DataMap * @output_type COMPOSITE * END*/ using namespace std; class extractMarieDataMap : public BufferedNode { private: //intputs int m_dataMapID; //outputs int m_compositeID; public: extractMarieDataMap(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_dataMapID = addInput("DATA_MAP"); //outputs m_compositeID = addInput("COMPOSITE"); } void calculate(int output_id, int count, Buffer &out) { try { //get input RCPtr<MarieDataMap> data = getInput(m_dataMapID,count); const std::map<std::string, std::string> my_map = data->getValues(); CompositeType *cType = new CompositeType(); for (map<string,string>::const_iterator iter = my_map.begin(); iter != my_map.end(); iter++) { stringstream key((*iter).first); stringstream value((*iter).second); try { //try to read FlowDesigner object ObjectRef ObjectValue; value >> ObjectValue; cType->addField(key.str(), ObjectValue); } catch(...) { //unable to read FlowDesigner Object //output standard string ObjectRef ObjectValue(new String(value.str())); cType->addField(key.str(),ObjectValue); } } //output Composite type out[count] = ObjectRef(cType); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class extractMarieDataMap }//namespace marie --- NEW FILE: extractMarieDataLaser.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieDataLaser.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class extractMarieDataLaser; DECLARE_NODE(extractMarieDataLaser) /*Node * * @name extractMarieDataLaser * @category RobotFlow:MARIE:DATA * @description Extract data in the FlowDesigner format from MarieDataLaser * * @input_name DATA_LASER * @input_type MarieDataLaser * @input_description MarieDataLaser object * * @output_name RANGES * @output_description Range contained in the MarieDataLaser object * @output_type Vector<int> * END*/ using namespace std; class extractMarieDataLaser : public BufferedNode { private: //intputs int m_dataLaserID; //outputs int m_rangesID; public: extractMarieDataLaser(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_dataLaserID = addInput("DATA_LASER"); //outputs m_rangesID = addInput("RANGES"); } void calculate(int output_id, int count, Buffer &out) { try { //get input RCPtr<MarieDataLaser> data = getInput(m_dataLaserID,count); unsigned int size = data->getNbLaser(); const unsigned int *ranges = data->getRanges(); //copy range data into a vector Vector<int> *vect = Vector<int>::alloc(size); for (unsigned int i = 0; i < size; i++) { (*vect)[i] = (int) ranges[i]; } //output vector out[count] = ObjectRef(vect); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class extractMarieDataLaser }//namespace marie Index: Makefile.am =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/Makefile.am,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Makefile.am 28 Oct 2004 18:11:48 -0000 1.20 --- Makefile.am 28 Oct 2004 20:30:07 -0000 1.21 *************** *** 27,30 **** --- 27,34 ---- MarieCommandJoystick.cpp \ MarieRequestSystem.cpp \ + newMarieDataLaser.cpp \ + newMarieDataSonar.cpp \ + newMarieDataCamera.cpp \ + newMarieDataOdometry.cpp \ newMarieDataMap.cpp \ newMarieRequestSystem.cpp \ *************** *** 36,40 **** extractMarieCommandCamera.cpp \ extractMarieCommandMotor.cpp \ ! extractMarieCommandJoystick.cpp install-data-local: --- 40,49 ---- extractMarieCommandCamera.cpp \ extractMarieCommandMotor.cpp \ ! extractMarieCommandJoystick.cpp \ ! extractMarieDataLaser.cpp \ ! extractMarieDataSonar.cpp \ ! extractMarieDataCamera.cpp \ ! extractMarieDataOdometry.cpp \ ! extractMarieDataMap.cpp install-data-local: --- NEW FILE: extractMarieDataSonar.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieDataSonar.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class extractMarieDataSonar; DECLARE_NODE(extractMarieDataSonar) /*Node * * @name extractMarieDataSonar * @category RobotFlow:MARIE:DATA * @description Extract data in the FlowDesigner format from MarieDataSonar * * @input_name DATA_SONAR * @input_type MarieDataSonar * @input_description MarieDataSonar object * * @output_name RANGES * @output_description Range contained in the MarieDataSonar object * @output_type Vector<int> * END*/ using namespace std; class extractMarieDataSonar : public BufferedNode { private: //intputs int m_dataSonarID; //outputs int m_rangesID; public: extractMarieDataSonar(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_dataSonarID = addInput("DATA_SONAR"); //outputs m_rangesID = addInput("RANGES"); } void calculate(int output_id, int count, Buffer &out) { try { //get input RCPtr<MarieDataSonar> data = getInput(m_dataSonarID,count); unsigned int size = data->getNbSonar(); const unsigned int *ranges = data->getRanges(); //copy range data into a vector Vector<int> *vect = Vector<int>::alloc(size); for (unsigned int i = 0; i < size; i++) { (*vect)[i] = (int) ranges[i]; } //output vector out[count] = ObjectRef(vect); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class extractMarieDataSonar }//namespace marie --- NEW FILE: newMarieDataSonar.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieDataSonar.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class newMarieDataSonar; DECLARE_NODE(newMarieDataSonar) /*Node * * @name newMarieDataSonar * @category RobotFlow:MARIE:DATA * @description Create an object of type MarieDataSonar * * @input_name RANGES * @input_description Range to be transformed into a MarieDataSonar object * @input_type Vector<int> * * @output_name DATA_SONAR * @output_type MarieDataSonar * @output_description MarieDataSonar object * END*/ using namespace std; class newMarieDataSonar : public BufferedNode { private: //inputs int m_rangesID; //outputs int m_dataSonarID; public: newMarieDataSonar(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_rangesID = addInput("RANGES"); //outputs m_dataSonarID = addOutput("DATA_SONAR"); } void calculate(int output_id, int count, Buffer &out) { try { RCPtr<Vector<int> > ranges = getInput(m_rangesID,count); MarieDataSonar *data = new MarieDataSonar(); data->setNbSonar(ranges->size()); if (ranges->size() > 0) { data->setRanges((unsigned int*) &(*ranges)[0]); } //output result out[count] = ObjectRef(data); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class newMarieDataSonar }//namespace marie --- NEW FILE: extractMarieDataOdometry.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieDataOdometry.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class extractMarieDataOdometry; DECLARE_NODE(extractMarieDataOdometry) /*Node * * @name extractMarieDataOdometry * @category RobotFlow:MARIE:DATA * @description Extract data in the FlowDesigner format from MarieDataOdometry * * @input_name DATA_ODOMETRY * @input_type MarieDataOdometry * @input_description MarieDataOdometry object * * @output_name XPOS * @output_description X axis position * @output_type int * * @output_name YPOS * @output_description Y axis position * @output_type int * * @output_name ZPOS * @output_description Z axis position * @output_type int * * @output_name YAW * @output_description YAW angle * @output_type int * * @output_name PITCH * @output_description PITCH angle * @output_type int * * @output_name ROLL * @output_description ROLL angle * @output_type int * * @output_name LINEAR_SPEED * @output_description linear speed (X-Y) * @output_type int * * @output_name SIDE_SPEED * @output_description translational speed (X-Y) * @output_type int * * @output_name ROTATION_SPEED * @output_description rotation speed (X-Y) * @output_type int * END*/ using namespace std; class extractMarieDataOdometry : public BufferedNode { private: //intputs int m_dataOdometryID; //outputs int m_XposID; int m_YposID; int m_ZposID; int m_yawID; int m_pitchID; int m_rollID; int m_linSpeedID; int m_sideSpeedID; int m_rotSpeedID; public: extractMarieDataOdometry(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_dataOdometryID = addInput("DATA_ODOMETRY"); //outputs m_XposID = addOutput("XPOS"); m_YposID = addOutput("YPOS"); m_ZposID = addOutput("ZPOS"); m_yawID = addOutput("YAW"); m_pitchID = addOutput("PITCH"); m_rollID = addOutput("ROLL"); m_linSpeedID = addOutput("LINEAR_SPEED"); m_sideSpeedID = addOutput("SIDE_SPEED"); m_rotSpeedID = addOutput("ROTATION_SPEED"); } void calculate(int output_id, int count, Buffer &out) { try { //get input RCPtr<MarieDataOdometry> data = getInput(m_dataOdometryID,count); int x,y,z,yaw,pitch,roll, linspeed, sidespeed,rotspeed; data->getPosition(x,y,z); data->getOrientation(yaw,pitch,roll); data->getSpeed(linspeed,sidespeed,rotspeed); //output data (*outputs[m_XposID].buffer)[count] = ObjectRef(Int::alloc(x)); (*outputs[m_YposID].buffer)[count] = ObjectRef(Int::alloc(y)); (*outputs[m_ZposID].buffer)[count] = ObjectRef(Int::alloc(z)); (*outputs[m_yawID].buffer)[count] = ObjectRef(Int::alloc(yaw)); (*outputs[m_pitchID].buffer)[count] = ObjectRef(Int::alloc(pitch)); (*outputs[m_rollID].buffer)[count] = ObjectRef(Int::alloc(roll)); (*outputs[m_linSpeedID].buffer)[count] = ObjectRef(Int::alloc(linspeed)); (*outputs[m_sideSpeedID].buffer)[count] = ObjectRef(Int::alloc(sidespeed)); (*outputs[m_rotSpeedID].buffer)[count] = ObjectRef(Int::alloc(rotspeed)); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class extractMarieDataOdometry }//namespace marie --- NEW FILE: extractMarieDataCamera.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieDataCamera.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class extractMarieDataCamera; DECLARE_NODE(extractMarieDataCamera) /*Node * * @name extractMarieDataCamera * @category RobotFlow:MARIE:DATA * @description Extract data in the FlowDesigner format from MarieDataCamera * * @input_name DATA_CAMERA * @input_type MarieDataCamera * @input_description MarieDataCamera object * * @output_name PAN * @output_description Pan of the camera * @output_type int * * @output_name TILT * @output_description Tilt of the camera * @output_type int * * @output_name ZOOM * @output_description Zoom of the camera * @output_type int * * @output_name IMAGE_WIDTH * @output_description image width from the camera * @output_type int * * @output_name IMAGE_HEIGHT * @output_description image height from the camera * @output_type int * * @output_name IMAGE_FORMAT * @output_description format of the image * @output_type string * * @output_name IMAGE * @output_description the image data * @output_type Image * END*/ using namespace std; class extractMarieDataCamera : public BufferedNode { private: //inputs int m_inputID; //outputs int m_panID; int m_tiltID; int m_zoomID; int m_imageWidthID; int m_imageHeightID; int m_imageID; int m_imageFormatID; public: extractMarieDataCamera(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_inputID = addInput("DATA_CAMERA"); //outputs m_panID = addOutput("PAN"); m_tiltID = addOutput("TILT"); m_zoomID = addOutput("ZOOM"); m_imageWidthID = addOutput("IMAGE_WIDTH"); m_imageHeightID = addOutput("IMAGE_HEIGHT"); m_imageID = addOutput("IMAGE"); m_imageFormatID = addOutput("IMAGE_FORMAT"); } void calculate(int output_id, int count, Buffer &out) { try { RCPtr<MarieDataCamera> dataCameraObject = getInput(m_inputID,count); int pan, tilt, zoom; dataCameraObject->getPTZ(pan,tilt,zoom); unsigned int width,height; dataCameraObject->getImageSize(width,height); (*outputs[m_panID].buffer)[count] = ObjectRef(Int::alloc(pan)); (*outputs[m_tiltID].buffer)[count] = ObjectRef(Int::alloc(tilt)); (*outputs[m_zoomID].buffer)[count] = ObjectRef(Int::alloc(zoom)); (*outputs[m_imageWidthID].buffer)[count] = ObjectRef(Int::alloc(width)); (*outputs[m_imageHeightID].buffer)[count] = ObjectRef(Int::alloc(height)); (*outputs[m_imageFormatID].buffer)[count] = ObjectRef(new String(dataCameraObject->getImageFormat())); //TODO output image (*outputs[m_imageID].buffer)[count] = nilObject; } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class extractMarieDataCamera }//namespace marie --- NEW FILE: newMarieDataLaser.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieDataLaser.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class newMarieDataLaser; DECLARE_NODE(newMarieDataLaser) /*Node * * @name newMarieDataLaser * @category RobotFlow:MARIE:DATA * @description Create an object of type MarieDataLaser * * @input_name RANGES * @input_description Range to be transformed into a MarieDataLaser object * @input_type Vector<int> * * @output_name DATA_LASER * @output_type MarieDataLaser * @output_description MarieDataLaser object * END*/ using namespace std; class newMarieDataLaser : public BufferedNode { private: //inputs int m_rangesID; //outputs int m_dataLaserID; public: newMarieDataLaser(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_rangesID = addInput("RANGES"); //outputs m_dataLaserID = addOutput("DATA_LASER"); } void calculate(int output_id, int count, Buffer &out) { try { RCPtr<Vector<int> > ranges = getInput(m_rangesID,count); MarieDataLaser *data = new MarieDataLaser(); data->setNbLaser(ranges->size()); if (ranges->size() > 0) { data->setRanges((unsigned int*) &(*ranges)[0]); } //output result out[count] = ObjectRef(data); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class newMarieDataLaser }//namespace marie --- NEW FILE: newMarieDataOdometry.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieDataOdometry.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class newMarieDataOdometry; DECLARE_NODE(newMarieDataOdometry) /*Node * * @name newMarieDataOdometry * @category RobotFlow:MARIE:DATA * @description Create an object of type MarieDataOdometry * * @input_name XPOS * @input_description X axis position * @input_type int * * @input_name YPOS * @input_description Y axis position * @input_type int * * @input_name ZPOS * @input_description Z axis position * @input_type int * * @input_name YAW * @input_description YAW angle * @input_type int * * @input_name PITCH * @input_description PITCH angle * @input_type int * * @input_name ROLL * @input_description ROLL angle * @input_type int * * @input_name LINEAR_SPEED * @input_description linear speed (X-Y) * @input_type int * * @input_name SIDE_SPEED * @input_description translational speed (X-Y) * @input_type int * * @input_name ROTATION_SPEED * @input_description rotation speed (X-Y) * @input_type int * * @output_name DATA_ODOMETRY * @output_type MarieDataOdometry * @output_description MarieDataOdometry object * END*/ using namespace std; class newMarieDataOdometry : public BufferedNode { private: //inputs int m_XposID; int m_YposID; int m_ZposID; int m_yawID; int m_pitchID; int m_rollID; int m_linSpeedID; int m_sideSpeedID; int m_rotSpeedID; //outputs int m_dataOdometryID; public: newMarieDataOdometry(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_XposID = addInput("XPOS"); m_YposID = addInput("YPOS"); m_ZposID = addInput("ZPOS"); m_yawID = addInput("YAW"); m_pitchID = addInput("PITCH"); m_rollID = addInput("ROLL"); m_linSpeedID = addInput("LINEAR_SPEED"); m_sideSpeedID = addInput("SIDE_SPEED"); m_rotSpeedID = addInput("ROTATION_SPEED"); //outputs m_dataOdometryID = addOutput("DATA_ODOMETRY"); } void calculate(int output_id, int count, Buffer &out) { try { MarieDataOdometry *data = new MarieDataOdometry(); //get all inputs RCPtr<Int> xpos = getInput(m_XposID,count); RCPtr<Int> ypos = getInput(m_YposID,count); RCPtr<Int> zpos = getInput(m_ZposID,count); RCPtr<Int> yaw = getInput(m_yawID,count); RCPtr<Int> pitch = getInput(m_pitchID,count); RCPtr<Int> roll = getInput(m_rollID,count); RCPtr<Int> linSpeed = getInput(m_linSpeedID,count); RCPtr<Int> sideSpeed = getInput(m_sideSpeedID,count); RCPtr<Int> rotSpeed = getInput(m_rotSpeedID,count); data->setPosition(*xpos,*ypos,*zpos); data->setOrientation(*yaw,*pitch,*roll); data->setSpeed(*linSpeed,*sideSpeed,*rotSpeed); //output result out[count] = ObjectRef(data); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class newMarieDataOdometry }//namespace marie Index: newMarieDataCamera.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieDataCamera.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** newMarieDataCamera.cpp 28 Oct 2004 15:03:31 -0000 1.1 --- newMarieDataCamera.cpp 28 Oct 2004 20:30:07 -0000 1.2 *************** *** 1,5 **** /* * MARIE - Mobile and Autonomous Robotics Integration Environment ! * Copyright (C) 2004 Dominic Letourneau * * This library is free software; you can redistribute it and/or --- 1,5 ---- /* * MARIE - Mobile and Autonomous Robotics Integration Environment ! * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or *************** *** 19,29 **** * You can contact MARIE development team at http://marie.sourceforge.net */ ! #include "MarieDataCamera.h" ! #include "MarieDataNull.h" #include <sstream> #include <string> namespace marie { class newMarieDataCamera; --- 19,34 ---- * You can contact MARIE development team at http://marie.sourceforge.net */ ! #include <sstream> #include <string> + #include "MarieDataCamera.h" + #include "MarieXMLDataFactory.h" + #include "Behavior.h" + #include "Vector.h" + #include "MarieDataNull.h" namespace marie { + //forward declaration class newMarieDataCamera; *************** *** 33,115 **** * @name newMarieDataCamera * @category RobotFlow:MARIE:DATA ! * @description Create MARIE DataCamera object * ! * @input_name ABS_PAN * @input_type int - * @input_description Absolute PAN * ! * @input_name ABS_TILT * @input_type int - * @input_description Absolute TILT * ! * @input_name ABS_ZOOM * @input_type int - * @input_description Absolute ZOOM * ! * @output_name DATA_CAMERA ! * @output_type DataCamera ! * @output_description new MARIE DataCamera Object * END*/ ! using namespace std; ! class newMarieDataCamera : public BufferedNode { ! private: - //inputs int m_panID; int m_tiltID; int m_zoomID; ! //outputs int m_dataCameraID; public: ! newMarieDataCamera(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs ! m_panID = addInput("ABS_PAN"); ! m_tiltID = addInput("ABS_TILT"); ! m_zoomID = addInput("ABS_ZOOM"); ! //outputs m_dataCameraID = addOutput("DATA_CAMERA"); - } void calculate(int output_id, int count, Buffer &out) ! { ! ! ObjectRef panValue = getInput(m_panID,count); ! ObjectRef tiltValue = getInput(m_tiltID,count); ! ObjectRef zoomValue = getInput(m_zoomID,count); ! ! ! if (!panValue->isNil() && ! !tiltValue->isNil() && ! !zoomValue->isNil()) ! { ! MarieDataCamera *camera = new MarieDataCamera(); ! RCPtr<Int> pan = panValue; ! RCPtr<Int> tilt = tiltValue; ! RCPtr<Int> zoom = zoomValue; ! camera->setPTZ(*pan,*tilt,*zoom); ! out[count] = ObjectRef(camera); ! } ! else { ! out[count] = ObjectRef(new MarieDataNull()); } ! } ! };//class newMarieDataCamera }//namespace marie --- 38,149 ---- * @name newMarieDataCamera * @category RobotFlow:MARIE:DATA ! * @description Create an object of type MarieDataCamera * ! * @input_name PAN ! * @input_description Pan of the camera * @input_type int * ! * @input_name TILT ! * @input_description Tilt of the camera ! * @input_type int ! * ! * @input_name ZOOM ! * @input_description Zoom of the camera * @input_type int * ! * @input_name IMAGE_WIDTH ! * @input_description image width from the camera * @input_type int * ! * @input_name IMAGE_HEIGHT ! * @input_description image height from the camera ! * @input_type int ! * ! * @input_name IMAGE_FORMAT ! * @input_description format of the image ! * @input_type string ! * ! * @input_name IMAGE ! * @input_description the image data ! * @input_type Image * + * @output_name DATA_CAMERA + * @output_type MarieDataCamera + * @output_description MarieDataCamera object + * END*/ ! ! using namespace std; ! class newMarieDataCamera : public BufferedNode ! { ! private: //inputs int m_panID; int m_tiltID; int m_zoomID; ! int m_imageWidthID; ! int m_imageHeightID; ! int m_imageFormatID; ! int m_imageID; ! //outputs int m_dataCameraID; public: ! ! newMarieDataCamera(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs ! m_panID = addInput("PAN"); ! m_tiltID = addInput("TILT"); ! m_zoomID = addInput("ZOOM"); ! m_imageWidthID = addInput("IMAGE_WIDTH"); ! m_imageHeightID = addInput("IMAGE_HEIGHT"); ! m_imageFormatID = addInput("IMAGE_FORMAT"); ! m_imageID = addInput("IMAGE"); ! //outputs m_dataCameraID = addOutput("DATA_CAMERA"); } void calculate(int output_id, int count, Buffer &out) ! { ! try ! { ! ! MarieDataCamera *data = new MarieDataCamera(); ! RCPtr<Int> pan = getInput(m_panID,count); ! RCPtr<Int> tilt = getInput(m_tiltID,count); ! RCPtr<Int> zoom = getInput(m_zoomID,count); ! data->setPTZ(*pan,*tilt,*zoom); ! RCPtr<Int> width = getInput(m_imageWidthID,count); ! RCPtr<Int> height = getInput(m_imageHeightID,count); ! RCPtr<String> format = getInput(m_imageFormatID,count); ! data->setImageSize(*width,*height); ! data->setImageFormat(*format); ! //will do nothing with this input ! //TODO process image input properly ! ObjectRef image = getInput(m_imageID,count); ! ! //output result ! out[count] = ObjectRef(data); } ! catch (BaseException *e) { ! e->print(cerr); ! e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); ! throw e; } ! } };//class newMarieDataCamera }//namespace marie + |
From: Dominic L. <ma...@us...> - 2004-10-28 18:12:01
|
Update of /cvsroot/robotflow/RobotFlow/MARIE/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14514 Modified Files: Makefile.am Added Files: extractMarieCommandJoystick.cpp extractMarieCommandMotor.cpp newMarieCommandJoystick.cpp newMarieCommandMotor.cpp Log Message: commands now have all new / extract nodes --- NEW FILE: extractMarieCommandMotor.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieCommandMotor.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class extractMarieCommandMotor; DECLARE_NODE(extractMarieCommandMotor) /*Node * * @name extractMarieCommandMotor * @category RobotFlow:MARIE:COMMAND * @description Extract data in the FlowDesigner format from MarieCommandMotor * * @input_name COMMAND_MOTOR * @input_type MarieCommandMotor * @input_description The MarieCommandMotor object * * @output_name VELOCITY * @output_type int * @output_description output velocity * * @output_name ROTATION * @output_type int * @output_description output rotation * * END*/ using namespace std; class extractMarieCommandMotor : public BufferedNode { private: //intputs int m_commandMotorID; //outputs int m_velocityOutID; int m_rotationOutID; public: extractMarieCommandMotor(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_commandMotorID = addInput("COMMAND_MOTOR"); //outputs m_velocityOutID = addOutput("VELOCITY"); m_rotationOutID = addOutput("ROTATION"); } void calculate(int output_id, int count, Buffer &out) { try { //get input RCPtr<MarieCommandMotor> command = getInput(m_commandMotorID,count); //output data (*outputs[m_velocityOutID].buffer)[count] = ObjectRef(Int::alloc(command->getVelocity())); (*outputs[m_rotationOutID].buffer)[count] = ObjectRef(Int::alloc(command->getRotation())); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class extractMarieCommandMotor }//namespace marie --- NEW FILE: extractMarieCommandJoystick.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieCommandJoystick.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class extractMarieCommandJoystick; DECLARE_NODE(extractMarieCommandJoystick) /*Node * * @name extractMarieCommandJoystick * @category RobotFlow:MARIE:COMMAND * @description Extract data in the FlowDesigner format from MarieCommandJoystick * * @input_name COMMAND_JOYSTICK * @input_type MarieCommandJoystick * @input_description The MarieCommandJoystick object * * @output_name X * @output_type int * @output_description input x, nilObject if not used * * @output_name Y * @output_type int * @output_description input y, nilObject if not used * * @output_name XMIN * @output_type int * @output_description input xmin, nilObject if not used * * @output_name YMIN * @output_type int * @output_description input ymin, nilObject if not used * * @output_name XMAX * @output_type int * @output_description input xmax, nilObject if not used * * @output_name YMAX * @output_type int * @output_description input ymax, nilObject if not used * * @output_name NBBUTTONS * @output_type int * @output_description output nb buttons, nilObject if not used * * @output_name BUTTONSTATE * @output_type int * @output_description output button state, nilObject if not used * END*/ using namespace std; class extractMarieCommandJoystick : public BufferedNode { private: //intputs int m_commandInID; //outputs int m_xOutID; int m_yOutID; int m_xminOutID; int m_yminOutID; int m_xmaxOutID; int m_ymaxOutID; int m_nbButtonsOutID; int m_buttonStateOutID; public: extractMarieCommandJoystick(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_commandInID = addInput("COMMAND_JOYSTICK"); //outputs m_xOutID = addOutput("X"); m_yOutID = addOutput("Y"); m_xminOutID = addOutput("XMIN"); m_yminOutID = addOutput("YMIN"); m_xmaxOutID = addOutput("XMAX"); m_ymaxOutID = addOutput("YMAX"); m_nbButtonsOutID = addOutput("NBBUTTONS"); m_buttonStateOutID = addOutput("BUTTONSTATE"); } void calculate(int output_id, int count, Buffer &out) { try { RCPtr<MarieCommandJoystick> command = getInput(m_commandInID,count); int x, y, xmin, ymin, xmax, ymax, nbButtons, buttonState = 0; command->getXY(x, y); command->getMinXY(xmin, ymin); command->getMaxXY(xmax, ymax); nbButtons = command->getNbButtons(); buttonState = command->getButtonState(); //output data (*outputs[m_xOutID].buffer)[count] = ObjectRef(Int::alloc(x)); (*outputs[m_yOutID].buffer)[count] = ObjectRef(Int::alloc(y)); (*outputs[m_xminOutID].buffer)[count] = ObjectRef(Int::alloc(xmin)); (*outputs[m_yminOutID].buffer)[count] = ObjectRef(Int::alloc(ymin)); (*outputs[m_xmaxOutID].buffer)[count] = ObjectRef(Int::alloc(xmax)); (*outputs[m_ymaxOutID].buffer)[count] = ObjectRef(Int::alloc(ymax)); (*outputs[m_nbButtonsOutID].buffer)[count] = ObjectRef(Int::alloc(nbButtons)); (*outputs[m_buttonStateOutID].buffer)[count] = ObjectRef(Int::alloc(buttonState)); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class extractMarieCommandJoystick }//namespace marie --- NEW FILE: newMarieCommandMotor.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieCommandMotor.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class newMarieCommandMotor; DECLARE_NODE(newMarieCommandMotor) /*Node * * @name newMarieCommandMotor * @category RobotFlow:MARIE:COMMAND * @description Create an object of type MarieCommandMotor * * @input_name VELOCITY * @input_type int * @input_description input velocity * * @input_name ROTATION * @input_type int * @input_description input rotation * * @output_name COMMAND_MOTOR * @output_description Output MARIE BehaviorCommand data object * @output_type MarieCommandBahavior * END*/ using namespace std; class newMarieCommandMotor : public BufferedNode { private: //intputs int m_velocityInID; int m_rotationInID; //outputs int m_commandOutID; public: newMarieCommandMotor(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //intputs m_velocityInID = addInput("VELOCITY"); m_rotationInID = addInput("ROTATION"); //outputs m_commandOutID = addOutput("COMMAND_MOTOR"); } void calculate(int output_id, int count, Buffer &out) { try { RCPtr<Int> velocity = getInput(m_velocityInID,count); RCPtr<Int> rotation = getInput(m_rotationInID,count); MarieCommandMotor *command = new MarieCommandMotor(); command->setVelocity(*velocity); command->setRotation(*rotation); //output result out[count] = command; } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class newMarieCommandMotor }//namespace marie Index: Makefile.am =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/Makefile.am,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Makefile.am 28 Oct 2004 15:03:29 -0000 1.19 --- Makefile.am 28 Oct 2004 18:11:48 -0000 1.20 *************** *** 18,36 **** MarieDataOdometry.cpp \ MarieDataNull.cpp \ MarieCommandBehavior.cpp \ MarieCommandCamera.cpp \ MarieCommandMotor.cpp \ ! MarieDataRaw.cpp \ ! MarieCommandJoystick.cpp \ ! MarieDataIR.cpp \ ! MarieDataBumper.cpp \ ! MarieDataMap.cpp \ ! newMarieDataMap.cpp \ MarieRequestSystem.cpp \ newMarieRequestSystem.cpp \ - extractMarieCommandBehavior.cpp \ newMarieCommandBehavior.cpp \ extractMarieCommandCamera.cpp \ ! newMarieCommandCamera.cpp install-data-local: --- 18,40 ---- MarieDataOdometry.cpp \ MarieDataNull.cpp \ + MarieDataRaw.cpp \ + MarieDataIR.cpp \ + MarieDataBumper.cpp \ + MarieDataMap.cpp \ MarieCommandBehavior.cpp \ MarieCommandCamera.cpp \ MarieCommandMotor.cpp \ ! MarieCommandJoystick.cpp \ MarieRequestSystem.cpp \ + newMarieDataMap.cpp \ newMarieRequestSystem.cpp \ newMarieCommandBehavior.cpp \ + newMarieCommandCamera.cpp \ + newMarieCommandMotor.cpp \ + newMarieCommandJoystick.cpp \ + extractMarieCommandBehavior.cpp \ extractMarieCommandCamera.cpp \ ! extractMarieCommandMotor.cpp \ ! extractMarieCommandJoystick.cpp install-data-local: --- NEW FILE: newMarieCommandJoystick.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieCommandJoystick.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class newMarieCommandJoystick; DECLARE_NODE(newMarieCommandJoystick) /*Node * * @name newMarieCommandJoystick * @category RobotFlow:MARIE:COMMAND * @description Create an object of type MarieCommandJoystick * * @input_name X * @input_type int * @input_description input x, nilObject if not used * * @input_name Y * @input_type int * @input_description input y, nilObject if not used * * @input_name XMIN * @input_type int * @input_description input xmin, nilObject if not used * * @input_name YMIN * @input_type int * @input_description input ymin, nilObject if not used * * @input_name XMAX * @input_type int * @input_description input xmax, nilObject if not used * * @input_name YMAX * @input_type int * @input_description input ymax, nilObject if not used * * @input_name NBBUTTONS * @input_type int * @input_description input nb buttons, nilObject if not used * * @input_name BUTTONSTATE * @input_type int * @input_description input button state, nilObject if not used * * @output_name COMMAND_JOYSTICK * @output_description Output MARIE CommandJoystick data object * @output_type MarieCommandJoystick * END*/ using namespace std; class newMarieCommandJoystick : public BufferedNode { private: //inputs int m_xInID; int m_yInID; int m_xminInID; int m_yminInID; int m_xmaxInID; int m_ymaxInID; int m_nbButtonsInID; int m_buttonStateInID; //outputs int m_commandOutID; public: newMarieCommandJoystick(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_xInID = addInput("X"); m_yInID = addInput("Y"); m_xminInID = addInput("XMIN"); m_yminInID = addInput("YMIN"); m_xmaxInID = addInput("XMAX"); m_ymaxInID = addInput("YMAX"); m_nbButtonsInID = addInput("NBBUTTONS"); m_buttonStateInID = addInput("BUTTONSTATE"); //outputs m_commandOutID = addOutput("COMMAND_JOYSTICK"); } void calculate(int output_id, int count, Buffer &out) { try { //get all inputs ObjectRef xInValue = getInput(m_xInID,count); ObjectRef yInValue = getInput(m_yInID,count); ObjectRef xminInValue = getInput(m_xminInID,count); ObjectRef yminInValue = getInput(m_yminInID,count); ObjectRef xmaxInValue = getInput(m_xmaxInID,count); ObjectRef ymaxInValue = getInput(m_ymaxInID,count); ObjectRef nbButtonsInValue = getInput(m_nbButtonsInID,count); ObjectRef buttonStateInValue = getInput(m_buttonStateInID,count); //create command object MarieCommandJoystick *command = new MarieCommandJoystick(); int x, y, xmin, ymin, xmax, ymax, nbButtons, buttonState = 0; //get x if (!xInValue->isNil()) { RCPtr<Int> xPtr = xInValue; x = *xPtr; } //get y if (!yInValue->isNil()) { RCPtr<Int> yPtr = yInValue; y = *yPtr; } //get xmin if (!xminInValue->isNil()) { RCPtr<Int> xminPtr = xminInValue; xmin = *xminPtr; } //get ymin if (!yminInValue->isNil()) { RCPtr<Int> yminPtr = yminInValue; ymin = *yminPtr; } //get xmax if (!xmaxInValue->isNil()) { RCPtr<Int> xmaxPtr = xmaxInValue; xmax = *xmaxPtr; } //get ymax if (!ymaxInValue->isNil()) { RCPtr<Int> ymaxPtr = ymaxInValue; ymax = *ymaxPtr; } //get nbButtons if (!nbButtonsInValue->isNil()) { RCPtr<Int> nbButtonsPtr = nbButtonsInValue; nbButtons = *nbButtonsPtr; } //get buttonState if (!buttonStateInValue->isNil()) { RCPtr<Int> buttonStatePtr = buttonStateInValue; buttonState = *buttonStatePtr; } //set PTZ command->setXY(x, y); command->setMinXY(xmin, ymin); command->setMaxXY(xmax, ymax); command->setNbButtons(nbButtons); command->setButtonState(buttonState); //output command object out[count] = ObjectRef(command); } catch(BaseException *e) { e->print(cerr); throw e->add(new GeneralException("",__FILE__,__LINE__)); } } };//class newMarieCommandJoystick }//namespace marie |
From: Dominic L. <ma...@us...> - 2004-10-28 15:03:45
|
Update of /cvsroot/robotflow/RobotFlow/MARIE/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31325 Modified Files: Makefile.am Added Files: extractMarieCommandBehavior.cpp extractMarieCommandCamera.cpp newMarieCommandCamera.cpp newMarieDataCamera.cpp Log Message: added extract and new for MARIE objects Index: Makefile.am =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/Makefile.am,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Makefile.am 26 Oct 2004 19:47:03 -0000 1.18 --- Makefile.am 28 Oct 2004 15:03:29 -0000 1.19 *************** *** 29,33 **** MarieRequestSystem.cpp \ newMarieRequestSystem.cpp \ ! newMarieCommandBehavior.cpp install-data-local: --- 29,36 ---- MarieRequestSystem.cpp \ newMarieRequestSystem.cpp \ ! extractMarieCommandBehavior.cpp \ ! newMarieCommandBehavior.cpp \ ! extractMarieCommandCamera.cpp \ ! newMarieCommandCamera.cpp install-data-local: --- NEW FILE: extractMarieCommandBehavior.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieCommandBehavior.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class extractMarieCommandBehavior; DECLARE_NODE(extractMarieCommandBehavior) /*Node * * @name extractMarieCommandBehavior * @category RobotFlow:MARIE:COMMAND * @description Extract data in the FlowDesigner format from MarieCommandBehavior * * @input_name COMMAND_BEHAVIOR * @input_type MarieCommandBehavior * @input_description The MarieCommandBehavior object * * @output_name ROBOTFLOW_ACTIVATION * @output_description RobotFlow activation vector * @output_type Vector<int> * END*/ using namespace std; class extractMarieCommandBehavior : public BufferedNode { private: //intputs int m_behaviorCommandID; //outputs int m_activationID; public: extractMarieCommandBehavior(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_behaviorCommandID = addInput("COMMAND_BEHAVIOR"); //outputs m_activationID = addOutput("ROBOTFLOW_ACTIVATION"); } void calculate(int output_id, int count, Buffer &out) { try { RCPtr<MarieCommandBehavior> command = getInput(m_behaviorCommandID,count); //create behavior activation vector (RobotFlow) Vector<int> *vect = Vector<int>::alloc(Behavior::get_behavior_size()); //get known behavior names vector<string>& behaviorNames = Behavior::get_behaviors(); const std::map<std::string, bool> &activationMap = command->getActivationMap(); //copy activation values if they exists, else set activation to false (0) for (int i = 0; i < vect->size(); i++) { //check if behavior exists if (activationMap.find(behaviorNames[i]) != activationMap.end()) { (*vect)[i] = (int) command->getActivation(behaviorNames[i]); } else { //default, not activated (*vect)[i] = 0; } } //output result out[count] = ObjectRef(vect); } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class extractMarieCommandBehavior }//namespace marie --- NEW FILE: extractMarieCommandCamera.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieCommandCamera.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class extractMarieCommandCamera; DECLARE_NODE(extractMarieCommandCamera) /*Node * * @name extractMarieCommandCamera * @category RobotFlow:MARIE:COMMAND * @description Extract data in the FlowDesigner format from MarieCommandBehavior * * @input_name COMMAND_CAMERA * @input_type MarieCommandCamera * @input_description The MarieCommandCamera object * * @output_name REL_BRIGHTNESS * @output_type int * @output_description output brightness * * @output_name REL_CONTRAST * @output_type int * @output_description output contrast * * @output_name REL_PAN * @output_type int * @output_description output pan * * @output_name REL_TILT * @output_type int * @output_description output tilt * * @output_name REL_ZOOM * @output_type int * @output_description output zoom * * @output_name ABS_BRIGHTNESS * @output_type int * @output_description output brightness * * @output_name ABS_CONTRAST * @output_type int * @output_description output contrast * * @output_name ABS_PAN * @output_type int * @output_description output pan * * @output_name ABS_TILT * @output_type int * @output_description output tilt * * @output_name ABS_ZOOM * @output_type int * @output_description output zoom * END*/ using namespace std; class extractMarieCommandCamera : public BufferedNode { private: //intputs int m_commandCameraID; //outputs int m_relBrightnessOutID; int m_relContrastOutID; int m_relPanOutID; int m_relTiltOutID; int m_relZoomOutID; int m_absBrightnessOutID; int m_absContrastOutID; int m_absPanOutID; int m_absTiltOutID; int m_absZoomOutID; public: extractMarieCommandCamera(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_commandCameraID = addInput("COMMAND_CAMERA"); //outputs m_relBrightnessOutID = addOutput("REL_BRIGHTNESS"); m_relContrastOutID = addOutput("REL_CONTRAST"); m_relPanOutID = addOutput("REL_PAN"); m_relTiltOutID = addOutput("REL_TILT"); m_relZoomOutID = addOutput("REL_ZOOM"); m_absBrightnessOutID = addOutput("ABS_BRIGHTNESS"); m_absContrastOutID = addOutput("ABS_CONTRAST"); m_absPanOutID = addOutput("ABS_PAN"); m_absTiltOutID = addOutput("ABS_TILT"); m_absZoomOutID = addOutput("ABS_ZOOM"); } void calculate(int output_id, int count, Buffer &out) { try { RCPtr<MarieCommandCamera> command = getInput(m_commandCameraID,count); int relPan, relTilt, relZoom, relContrast, relBrightness = 0; int absPan, absTilt, absZoom, absContrast, absBrightness = 0; std::bitset<10> state = command->getState(); //get camera data relPan = command->getRelativePan(); relTilt = command->getRelativeTilt(); relZoom = command->getRelativeZoom(); relContrast = command->getRelativeContrast(); relBrightness = command->getRelativeBrightness(); absPan = command->getAbsolutePan(); absTilt = command->getAbsoluteTilt(); absZoom = command->getAbsoluteZoom(); absContrast = command->getAbsoluteContrast(); absBrightness = command->getAbsoluteBrightness(); if(state[CommandCamera::REL_PAN] == 1) (*outputs[m_relPanOutID].buffer)[count] = ObjectRef(Int::alloc(relPan)); else (*outputs[m_relPanOutID].buffer)[count] = nilObject; if(state[CommandCamera::REL_TILT] == 1) (*outputs[m_relTiltOutID].buffer)[count] = ObjectRef(Int::alloc(relTilt)); else (*outputs[m_relTiltOutID].buffer)[count] = nilObject; if(state[CommandCamera::REL_ZOOM] == 1) (*outputs[m_relZoomOutID].buffer)[count] = ObjectRef(Int::alloc(relZoom)); else (*outputs[m_relZoomOutID].buffer)[count] = nilObject; if(state[CommandCamera::REL_BRIGHTNESS] == 1) (*outputs[m_relBrightnessOutID].buffer)[count] = ObjectRef(Int::alloc(relBrightness)); else (*outputs[m_relBrightnessOutID].buffer)[count] = nilObject; if(state[CommandCamera::REL_CONTRAST] == 1) (*outputs[m_relContrastOutID].buffer)[count] = ObjectRef(Int::alloc(relContrast)); else (*outputs[m_relContrastOutID].buffer)[count] = nilObject; if(state[CommandCamera::ABS_PAN] == 1) (*outputs[m_absPanOutID].buffer)[count] = ObjectRef(Int::alloc(absPan)); else (*outputs[m_absPanOutID].buffer)[count] = nilObject; if(state[CommandCamera::ABS_TILT] == 1) (*outputs[m_absTiltOutID].buffer)[count] = ObjectRef(Int::alloc(absTilt)); else (*outputs[m_absTiltOutID].buffer)[count] = nilObject; if(state[CommandCamera::ABS_ZOOM] == 1) (*outputs[m_absZoomOutID].buffer)[count] = ObjectRef(Int::alloc(absZoom)); else (*outputs[m_absZoomOutID].buffer)[count] = nilObject; if(state[CommandCamera::ABS_BRIGHTNESS] == 1) (*outputs[m_absBrightnessOutID].buffer)[count] = ObjectRef(Int::alloc(absBrightness)); else (*outputs[m_absBrightnessOutID].buffer)[count] = nilObject; if(state[CommandCamera::ABS_CONTRAST] == 1) (*outputs[m_absContrastOutID].buffer)[count] = ObjectRef(Int::alloc(absContrast)); else (*outputs[m_absContrastOutID].buffer)[count] = nilObject; } catch (BaseException *e) { e->print(cerr); e->add(new GeneralException("Unable to process",__FILE__,__LINE__)); throw e; } } };//class extractMarieCommandCamera }//namespace marie --- NEW FILE: newMarieCommandCamera.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include "MarieCommandCamera.h" #include "MarieDataNull.h" #include <sstream> #include <string> namespace marie { class newMarieCommandCamera; DECLARE_NODE(newMarieCommandCamera) /*Node * * @name newMarieCommandCamera * @category RobotFlow:MARIE:DATA * @description Create MARIE DataCamera object * * @input_name COMMAND_CAMERA * @input_type Input MarieCommandCamera * @input_description input CommandCamera, nilObject if not used * * @input_name REL_BRIGHTNESS * @input_type int * @input_description input brightness, nilObject if not used * * @input_name REL_CONTRAST * @input_type int * @input_description input contrast, nilObject if not used * * @input_name REL_PAN * @input_type int * @input_description input pan, nilObject if not used * * @input_name REL_TILT * @input_type int * @input_description input tilt, nilObject if not used * * @input_name REL_ZOOM * @input_type int * @input_description input zoom, nilObject if not used * * @input_name ABS_BRIGHTNESS * @input_type int * @input_description input brightness, nilObject if not used * * @input_name ABS_CONTRAST * @input_type int * @input_description input contrast, nilObject if not used * * @input_name ABS_PAN * @input_type int * @input_description input pan, nilObject if not used * * @input_name ABS_TILT * @input_type int * @input_description input tilt, nilObject if not used * * @input_name ABS_ZOOM * @input_type int * @input_description input zoom, nilObject if not used * * @output_name COMMAND_CAMERA * @output_type MarieCommandCamera * @output_description Output MarieCommandCamera (with new pan,tilt,zoom, brightness, contrast) * END*/ using namespace std; class newMarieCommandCamera : public BufferedNode { private: //inputs int m_relBrightnessInID; int m_relContrastInID; int m_relPanInID; int m_relTiltInID; int m_relZoomInID; int m_absBrightnessInID; int m_absContrastInID; int m_absPanInID; int m_absTiltInID; int m_absZoomInID; //outputs int m_commandOutID; public: newMarieCommandCamera(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_relBrightnessInID = addInput("REL_BRIGHTNESS"); m_relContrastInID = addInput("REL_CONTRAST"); m_relPanInID = addInput("REL_PAN"); m_relTiltInID = addInput("REL_TILT"); m_relZoomInID = addInput("REL_ZOOM"); m_absBrightnessInID = addInput("ABS_BRIGHTNESS"); m_absContrastInID = addInput("ABS_CONTRAST"); m_absPanInID = addInput("ABS_PAN"); m_absTiltInID = addInput("ABS_TILT"); m_absZoomInID = addInput("ABS_ZOOM"); //outputs m_commandOutID = addOutput("COMMAND_CAMERA"); } void calculate(int output_id, int count, Buffer &out) { try { //get all inputs ObjectRef relBrightnessInValue = getInput(m_relBrightnessInID,count); ObjectRef relContrastInValue = getInput(m_relContrastInID,count); ObjectRef relPanInValue = getInput(m_relPanInID,count); ObjectRef relTiltInValue = getInput(m_relTiltInID,count); ObjectRef relZoomInValue = getInput(m_relZoomInID,count); ObjectRef absBrightnessInValue = getInput(m_absBrightnessInID,count); ObjectRef absContrastInValue = getInput(m_absContrastInID,count); ObjectRef absPanInValue = getInput(m_absPanInID,count); ObjectRef absTiltInValue = getInput(m_absTiltInID,count); ObjectRef absZoomInValue = getInput(m_absZoomInID,count); //create command object MarieCommandCamera *command = new MarieCommandCamera(); //get pan if (!relPanInValue->isNil()) { RCPtr<Int> relPanPtr = relPanInValue; int relPan = *relPanPtr; command->setRelativePan(relPan); } //get tilt if (!relTiltInValue->isNil()) { RCPtr<Int> relTiltPtr = relTiltInValue; int relTilt = *relTiltPtr; command->setRelativeTilt(relTilt); } //get zoom if (!relZoomInValue->isNil()) { RCPtr<Int> relZoomPtr = relZoomInValue; int relZoom = *relZoomPtr; command->setRelativeZoom(relZoom); } //get contrast if (!relContrastInValue->isNil()) { RCPtr<Int> relContrastPtr = relContrastInValue; int relContrast = *relContrastPtr; command->setRelativeContrast(relContrast); } //get brightness if (!relBrightnessInValue->isNil()) { RCPtr<Int> relBrightnessPtr = relBrightnessInValue; int relBrightness = *relBrightnessPtr; command->setRelativeBrightness(relBrightness); } //get pan if (!absPanInValue->isNil()) { RCPtr<Int> absPanPtr = absPanInValue; int absPan = *absPanPtr; command->setAbsolutePan(absPan); } //get tilt if (!absTiltInValue->isNil()) { RCPtr<Int> absTiltPtr = absTiltInValue; int absTilt = *absTiltPtr; command->setAbsoluteTilt(absTilt); } //get zoom if (!absZoomInValue->isNil()) { RCPtr<Int> absZoomPtr = absZoomInValue; int absZoom = *absZoomPtr; command->setAbsoluteZoom(absZoom); } //get contrast if (!absContrastInValue->isNil()) { RCPtr<Int> absContrastPtr = absContrastInValue; int absContrast = *absContrastPtr; command->setAbsoluteContrast(absContrast); } //get brightness if (!absBrightnessInValue->isNil()) { RCPtr<Int> absBrightnessPtr = absBrightnessInValue; int absBrightness = *absBrightnessPtr; command->setAbsoluteBrightness(absBrightness); } //output command object out[count] = ObjectRef(command); } catch(BaseException *e) { e->print(cerr); throw e->add(new GeneralException("",__FILE__,__LINE__)); } } };//class newMarieCommandCamera }//namespace marie --- NEW FILE: newMarieDataCamera.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include "MarieDataCamera.h" #include "MarieDataNull.h" #include <sstream> #include <string> namespace marie { class newMarieDataCamera; DECLARE_NODE(newMarieDataCamera) /*Node * * @name newMarieDataCamera * @category RobotFlow:MARIE:DATA * @description Create MARIE DataCamera object * * @input_name ABS_PAN * @input_type int * @input_description Absolute PAN * * @input_name ABS_TILT * @input_type int * @input_description Absolute TILT * * @input_name ABS_ZOOM * @input_type int * @input_description Absolute ZOOM * * @output_name DATA_CAMERA * @output_type DataCamera * @output_description new MARIE DataCamera Object * END*/ using namespace std; class newMarieDataCamera : public BufferedNode { private: //inputs int m_panID; int m_tiltID; int m_zoomID; //outputs int m_dataCameraID; public: newMarieDataCamera(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_panID = addInput("ABS_PAN"); m_tiltID = addInput("ABS_TILT"); m_zoomID = addInput("ABS_ZOOM"); //outputs m_dataCameraID = addOutput("DATA_CAMERA"); } void calculate(int output_id, int count, Buffer &out) { ObjectRef panValue = getInput(m_panID,count); ObjectRef tiltValue = getInput(m_tiltID,count); ObjectRef zoomValue = getInput(m_zoomID,count); if (!panValue->isNil() && !tiltValue->isNil() && !zoomValue->isNil()) { MarieDataCamera *camera = new MarieDataCamera(); RCPtr<Int> pan = panValue; RCPtr<Int> tilt = tiltValue; RCPtr<Int> zoom = zoomValue; camera->setPTZ(*pan,*tilt,*zoom); out[count] = ObjectRef(camera); } else { out[count] = ObjectRef(new MarieDataNull()); } } };//class newMarieDataCamera }//namespace marie |
From: Dominic L. <ma...@us...> - 2004-10-26 19:47:39
|
Update of /cvsroot/robotflow/RobotFlow/MARIE/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16162 Modified Files: Makefile.am Added Files: newMarieCommandBehavior.cpp Log Message: added newMarieCommandBehavior.cpp Index: Makefile.am =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/Makefile.am,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Makefile.am 22 Sep 2004 20:24:51 -0000 1.17 --- Makefile.am 26 Oct 2004 19:47:03 -0000 1.18 *************** *** 28,32 **** newMarieDataMap.cpp \ MarieRequestSystem.cpp \ ! newMarieRequestSystem.cpp install-data-local: --- 28,33 ---- newMarieDataMap.cpp \ MarieRequestSystem.cpp \ ! newMarieRequestSystem.cpp \ ! newMarieCommandBehavior.cpp install-data-local: --- NEW FILE: newMarieCommandBehavior.cpp --- /* * MARIE - Mobile and Autonomous Robotics Integration Environment * Copyright (C) 2004 Dominic Letourneau / Carle Cote * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * You can contact MARIE development team at http://marie.sourceforge.net */ #include <sstream> #include <string> #include "MarieCommandBehavior.h" #include "MarieXMLDataFactory.h" #include "Behavior.h" #include "Vector.h" #include "MarieDataNull.h" namespace marie { //forward declaration class newMarieCommandBehavior; DECLARE_NODE(newMarieCommandBehavior) /*Node * * @name newMarieCommandBehavior * @category RobotFlow:MARIE:COMMAND * @description Create an object of type MarieCommandBehavior * * @input_name BEHAVIOR_NAME * @input_type string * @input_description The behavior name that will be activated/deactivated * * @input_name BEHAVIOR_ACTIVATION * @input_type bool * @input_description true if the specified behavior is activated * * @output_name COMMAND_BEHAVIOR * @output_description Output MARIE BehaviorCommand data object * @output_type MarieCommandBahavior * END*/ using namespace std; class newMarieCommandBehavior : public BufferedNode { private: //intputs int m_behaviorNameID; int m_behaviorActivationID; //outputs int m_behaviorCommandID; public: newMarieCommandBehavior(string nodeName, ParameterSet params) : BufferedNode(nodeName,params) { //inputs m_behaviorNameID = addInput("BEHAVIOR_NAME"); m_behaviorActivationID = addInput("BEHAVIOR_ACTIVATION"); //outputs m_behaviorCommandID = addOutput("COMMAND_BEHAVIOR"); } void calculate(int output_id, int count, Buffer &out) { ObjectRef BehaviorNameValue = getInput(m_behaviorNameID,count); ObjectRef BehaviorActivationValue = getInput(m_behaviorActivationID,count); if (!BehaviorNameValue->isNil() && !BehaviorActivationValue->isNil()) { RCPtr<String> name = BehaviorNameValue; RCPtr<Bool> activation = BehaviorActivationValue; MarieCommandBehavior *cb = new MarieCommandBehavior(); cb->setActivation(name->val(), activation->val()); out[count] = ObjectRef(cb); } else { out[count] = ObjectRef(new MarieDataNull()); } } };//class newMarieCommandBehavior }//namespace marie |
From: Dominic L. <ma...@us...> - 2004-10-26 19:17:37
|
Update of /cvsroot/robotflow/RobotFlow/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9044 Modified Files: doc.html Log Message: Node documentation Index: doc.html =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/html/doc.html,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** doc.html 27 May 2004 19:23:36 -0000 1.16 --- doc.html 26 Oct 2004 19:17:27 -0000 1.17 *************** *** 38,42 **** <td><b>Nodes</b></td> <td>Available RobotFlow Nodes</td> ! <td>0.2.3</td> <td><a href="nodes.html">[HTML]</a></td> </tr> --- 38,42 ---- <td><b>Nodes</b></td> <td>Available RobotFlow Nodes</td> ! <td>0.2.4</td> <td><a href="nodes.html">[HTML]</a></td> </tr> |
From: Dominic L. <ma...@us...> - 2004-10-26 19:16:30
|
Update of /cvsroot/robotflow/RobotFlow/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8783 Modified Files: nodes.html Log Message: new node documentation Index: nodes.html =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/html/nodes.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** nodes.html 25 Jun 2004 19:18:25 -0000 1.3 --- nodes.html 26 Oct 2004 19:16:15 -0000 1.4 *************** *** 12,18 **** <tr><td>* <a href="#RobotFlow:Vision">RobotFlow:Vision</a></td> - <td>* <a href="#RobotFlow:MARIE:DATA">RobotFlow:MARIE:DATA</a></td></tr> - <tr><td>* <a href="#RobotFlow:Robots">RobotFlow:Robots</a></td> <td>* <a href="#RobotFlow:MARIE:COMMAND">RobotFlow:MARIE:COMMAND</a></td></tr> <tr><td>* <a href="#RobotFlow:Probes">RobotFlow:Probes</a></td> <td>* <a href="#RobotFlow:Generic">RobotFlow:Generic</a></td></tr> --- 12,18 ---- <tr><td>* <a href="#RobotFlow:Vision">RobotFlow:Vision</a></td> [...1416 lines suppressed...] + No description available<br> + <table BORDER COLS=4 WIDTH="75%" NOSAVE > + <tr> + <td WIDTH="10%"></td> + <th WIDTH="15%">NAME</th> + <th WIDTH="10%">TYPE</th> + <th WIDTH="40%">MEANING</th> + </tr> + <tr NOSAVE> + <th WIDTH="10%" ROWSPAN="#2">Inputs</th> + <td WIDTH="15%">ACTIVATED</td><td WIDTH="15%">any</td><td WIDTH="40%">No description available</td></tr><td WIDTH="15%">COMPONENTS</td><td WIDTH="15%">ComponentsData</td><td WIDTH="40%">The components from the image.</td></tr></tr> + <tr NOSAVE> + <th WIDTH="10%" ROWSPAN="#10">Outputs</th> + <td WIDTH="15%">EXPLOITATION</td><td WIDTH="15%">any</td><td WIDTH="40%">Exploitation of the behavior (computed in Behavior.cc)</td></tr><td WIDTH="15%">HEADING</td><td WIDTH="15%">int</td><td WIDTH="40%">The heading command</td></tr><td WIDTH="15%">VELOCITY</td><td WIDTH="15%">int</td><td WIDTH="40%">The velocity command</td></tr><td WIDTH="15%">RECT</td><td WIDTH="15%">CRect</td><td WIDTH="40%">The CRect if properly scaled and ready for recognition, else nilObject.</td></tr><td WIDTH="15%">DELTA_X</td><td WIDTH="15%">float</td><td WIDTH="40%">The difference between the center of the image ant the biggest blob (x).</td></tr><td WIDTH="15%">DELTA_Y</td><td WIDTH="15%">float</td><td WIDTH="40%">The difference between the center of the image ant the biggest blob (y).</td></tr><td WIDTH="15%">AREA</td><td WIDTH="15%">float</td><td WIDTH="40%">The Area of the color blob</td></tr><td WIDTH="15%">WIDTH</td><td WIDTH="15%">float</td><td WIDTH="40%">The width of the color blob</td></tr><td WIDTH="15%">HEIGHT</td><td WIDTH="15%">float</td><td WIDTH="40%">The height of the color blob</td></tr><td WIDTH="15%">BOUNDARY</td><td WIDTH="15%">float</td><td WIDTH="40%">The minimum size (in pixel) around the blob in the image.</td></tr></tr> + <tr NOSAVE> + <th WIDTH="10%" ROWSPAN="#4">Parameters</th> + <td WIDTH="15%">MIN_WIDTH</td><td WIDTH="15%">int</td><td WIDTH="40%">minimum width to obtain before we are ready for recognition.</td></tr><td WIDTH="15%">MIN_HEIGHT</td><td WIDTH="15%">int</td><td WIDTH="40%">minimum height to obtain before we are ready for recognition.</td></tr><td WIDTH="15%">FOREGROUND_COLOR_ID</td><td WIDTH="15%">int</td><td WIDTH="40%">The color number being tracked.</td></tr><td WIDTH="15%">BACKGROUND_COLOR_ID</td><td WIDTH="15%">int</td><td WIDTH="40%">The color number being tracked.</td></tr></tr> + </table> <br>Return to: <a href="#RobotFlow:Behaviors">RobotFlow:Behaviors</a><br><br>See next category: <a href="#-">-</a><br><br>Return to: <a href="#Categories of available FlowDesigner nodes">Categories of available FlowDesigner nodes</a><br><br><p><a NAME="Subsumption"></a> <h3> |
From: Dominic L. <ma...@us...> - 2004-10-26 19:02:05
|
Update of /cvsroot/robotflow/RobotFlow/html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5620 Modified Files: menu.html robotflow.webprj Added Files: demo.html Log Message: added Demo Section Index: robotflow.webprj =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/html/robotflow.webprj,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** robotflow.webprj 7 Apr 2004 12:41:54 -0000 1.8 --- robotflow.webprj 26 Oct 2004 19:01:54 -0000 1.9 *************** *** 23,26 **** --- 23,35 ---- <item url="status.html" /> <item url="documents/RobotFlow_Presentation.pdf" /> + <item url="demo.html" /> + <item url="images/" /> + <item url="images/CVS/" /> + <item url="images/CVS/Entries" /> + <item url="images/CVS/Repository" /> + <item url="images/CVS/Root" /> + <item url="images/laborius_logo_small.jpg" /> + <item url="images/shot2.jpg" /> + <item url="images/demo1.jpg" /> </project> </webproject> Index: menu.html =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/html/menu.html,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** menu.html 7 Apr 2004 12:52:44 -0000 1.6 --- menu.html 26 Oct 2004 19:01:54 -0000 1.7 *************** *** 11,22 **** <tr> ! <td style="vertical-align:top;" valign=top width="15%"> <center> <a class=menufont onmouseover="window.status='http://sourceforge.net/projects/robotflow/'; return true;" onmouseout="window.status=''; return false;" ! href="http://sourceforge.net/projects/robotflow/">RobotFlow@SourceForge</a> </center> </td> ! <td style="vertical-align:top;" valign=top width="8%"> <center> <a class=menufont onmouseover="window.status='HOME'; return true;" onmouseout="window.status=''; return false;" href="home.html">HOME</a> --- 11,22 ---- <tr> ! <td style="vertical-align:top;" valign=top width="10%"> <center> <a class=menufont onmouseover="window.status='http://sourceforge.net/projects/robotflow/'; return true;" onmouseout="window.status=''; return false;" ! href="http://sourceforge.net/projects/robotflow/">RobotFlow@SF</a> </center> </td> ! <td style="vertical-align:top;" valign=top width="9%"> <center> <a class=menufont onmouseover="window.status='HOME'; return true;" onmouseout="window.status=''; return false;" href="home.html">HOME</a> *************** *** 24,34 **** </td> ! <td style="vertical-align:top;" valign=top width="10%"> <center> ! <a class=menufont onmouseover="window.status='SCREENSHOTS'; return true;" onmouseout="window.status=''; return false;" href="shots.html">SCREENSHOTS</a> </center> </td> ! <td style="vertical-align:top;" valign=top width="8%"> <center> <a class=menufont onmouseover="window.status='DOCUMENTATION'; return true;" onmouseout="window.status=''; return false;" href="doc.html">DOC</a> --- 24,34 ---- </td> ! <td style="vertical-align:top;" valign=top width="9%"> <center> ! <a class=menufont onmouseover="window.status='SCREENSHOTS'; return true;" onmouseout="window.status=''; return false;" href="shots.html">SHOTS</a> </center> </td> ! <td style="vertical-align:top;" valign=top width="9%"> <center> <a class=menufont onmouseover="window.status='DOCUMENTATION'; return true;" onmouseout="window.status=''; return false;" href="doc.html">DOC</a> *************** *** 42,46 **** </td> ! <td style="vertical-align:top;" valign=top width="10%"> <center> <a class=menufont onmouseover="window.status='STATUS'; return true;" onmouseout="window.status=''; return false;" href="status.html">STATUS</a> --- 42,52 ---- </td> ! <td style="vertical-align:top;" valign=top width="9%"> ! <center> ! <a class=menufont onmouseover="window.status='DEMO'; return true;" onmouseout="window.status=''; return false;" href="demo.html">DEMO</a> ! </center> ! </td> ! ! <td style="vertical-align:top;" valign=top width="9%"> <center> <a class=menufont onmouseover="window.status='STATUS'; return true;" onmouseout="window.status=''; return false;" href="status.html">STATUS</a> *************** *** 48,52 **** </td> ! <td style="vertical-align:top;" valign=top width="10%"> <center> <a class=menufont onmouseover="window.status='DOWNLOAD'; return true;" onmouseout="window.status=''; return false;" href="download.html">DOWNLOAD</a> --- 54,58 ---- </td> ! <td style="vertical-align:top;" valign=top width="9%"> <center> <a class=menufont onmouseover="window.status='DOWNLOAD'; return true;" onmouseout="window.status=''; return false;" href="download.html">DOWNLOAD</a> *************** *** 54,58 **** </td> ! <td style="vertical-align:top;" valign=top width="10%"> <center> <a class=menufont onmouseover="window.status='NEWS'; return true;" onmouseout="window.status=''; return false;" href="news.html">NEWS</a> --- 60,64 ---- </td> ! <td style="vertical-align:top;" valign=top width="9%"> <center> <a class=menufont onmouseover="window.status='NEWS'; return true;" onmouseout="window.status=''; return false;" href="news.html">NEWS</a> *************** *** 60,64 **** </td> ! <td style="vertical-align:top;" valign=top width="10%"> <center> <a class=menufont onmouseover="window.status='LINKS'; return true;" onmouseout="window.status=''; return false;" href="links.html">LINKS</a> --- 66,70 ---- </td> ! <td style="vertical-align:top;" valign=top width="9%"> <center> <a class=menufont onmouseover="window.status='LINKS'; return true;" onmouseout="window.status=''; return false;" href="links.html">LINKS</a> *************** *** 66,70 **** </td> ! <td style="vertical-align:top;" valign=top width="10%"> <center> <a class=menufont onmouseover="window.status='AUTHORS'; return true;" onmouseout="window.status=''; return false;" href="authors.html">AUTHORS</a> --- 72,76 ---- </td> ! <td style="vertical-align:top;" valign=top width="9%"> <center> <a class=menufont onmouseover="window.status='AUTHORS'; return true;" onmouseout="window.status=''; return false;" href="authors.html">AUTHORS</a> --- NEW FILE: demo.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Demo</title> </head> <body> </body> <H1>Symbol Recognition Demonstration (CVS)</H1> <table width="100%"> <tr> <td> <center><img SRC="images/demo1.jpg" NOSAVE height=480 width=640></center></td> </tr> <tr> <td><center>26/10/2004 Symbol Recognition Demo CVS</center></td> </tr> </table> <br> <br> <br> The Symbol Recognition Demo provides FlowDesigner networks that are used to recognize printed text (alphanumeric) extracted from live (real-time) 320x240 color images. The latest RobotFlow toolkit must be installed before using this demo. FlowDesigner networks provided with this demo are easy to modify to suit your configuration (image size, video capture hardware). The idea with this demo is to provide a simple algorithm that extracts characters from color components. Characters are extracted from the image with a simple color segmentation algorithm (8 neighbors), with 1 color representing the background and 1 color representing the foreground color (printed text). When probable characters are found in the image, the algorithm gives incremental pan-tilt-zoom commands to the camera (if supported by the camera) to get the maximum resolution of the characters to extract. When the size of the characters is adequate, components are scaled and sent to a feed forward artificial neural network (ANN) on character at a time. The output of the ANN, for each character, is used as a probability for each character to be part of any word in the dictionary. <H1>DOCUMENTATION</H1> Documentation is available here : <a href="http://cvs.sourceforge.net/viewcvs.py/robotflow/RobotFlow/demo/SymbolRecog/README.TXT?rev=HEAD&view=auto">Latest CVS Version</a> <H1>DOWNLOAD</H1> 26/10/2004 Download will be available soon! However, you can already download it from the <a href="download.html">CVS</a>. <hr> <hr> <div align="right"> $Id: demo.html,v 1.1 2004/10/26 19:01:53 maestro Exp $ </div> </html> |
From: Dominic L. <ma...@us...> - 2004-10-26 19:02:04
|
Update of /cvsroot/robotflow/RobotFlow/html/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5620/images Added Files: demo1.jpg Log Message: added Demo Section --- NEW FILE: demo1.jpg --- (This appears to be a binary file; contents omitted.) |
From: Dominic L. <ma...@us...> - 2004-09-22 21:00:31
|
Update of /cvsroot/robotflow/RobotFlow/Generic/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2180 Modified Files: Makefile.am Added Files: Random.cc Log Message: Random number Generator --- NEW FILE: Random.cc --- #ifndef _RANDOM_CC_ #define _RANDOM_CC_ #include "BufferedNode.h" #include <sys/time.h> #include <stdlib.h> class Random; DECLARE_NODE(Random) /*Node * @name Random * @category RobotFlow:Generic * @description Get random number between [0-1] * * @parameter_name SEED * @parameter_type int * @parameter_description random number generator seed * * @output_name OUTPUT * @output_type float * @output_description * END*/ class Random : public BufferedNode { //outputs int m_outputID; //parameters int m_seed; public: Random(string nodeName, ParameterSet params) : BufferedNode(nodeName, params) { //outputs m_outputID = addOutput("OUTPUT"); if (parameters.exist("SEED")) { RCPtr<Int> SeedValue = parameters.get("SEED"); m_seed = SeedValue->val(); } else { m_seed = time(NULL); } } void calculate(int output_id, int count, Buffer &out) { float random_value = rand() / (RAND_MAX +1.0); out[count] = ObjectRef(Float::alloc(random_value)); }//calculate }; #endif Index: Makefile.am =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/Generic/src/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Makefile.am 27 Jul 2004 14:01:17 -0000 1.7 --- Makefile.am 22 Sep 2004 21:00:11 -0000 1.8 *************** *** 15,19 **** USleep.cc \ operators.cc \ ! DictionaryLookup.cc libRF_Generic_la_LDFLAGS = -release $(LT_RELEASE) --- 15,20 ---- USleep.cc \ operators.cc \ ! DictionaryLookup.cc \ ! Random.cc libRF_Generic_la_LDFLAGS = -release $(LT_RELEASE) |
From: Dominic L. <ma...@us...> - 2004-09-22 20:46:28
|
Update of /cvsroot/robotflow/RobotFlow/MARIE/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31606 Modified Files: newMarieRequestSystem.cpp Log Message: creating new MarieRequests Index: newMarieRequestSystem.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieRequestSystem.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** newMarieRequestSystem.cpp 22 Sep 2004 20:29:54 -0000 1.2 --- newMarieRequestSystem.cpp 22 Sep 2004 20:45:55 -0000 1.3 *************** *** 46,50 **** * @input_description Request ID to include in the request * ! * @input_name STATE * @input_type string * @input_description State to include in the request --- 46,50 ---- * @input_description Request ID to include in the request * ! * @input_name STATE * @input_type string * @input_description State to include in the request |
From: Dominic L. <ma...@us...> - 2004-09-22 20:30:06
|
Update of /cvsroot/robotflow/RobotFlow/MARIE/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28247 Modified Files: newMarieRequestSystem.cpp Log Message: creating new MarieRequests Index: newMarieRequestSystem.cpp =================================================================== RCS file: /cvsroot/robotflow/RobotFlow/MARIE/src/newMarieRequestSystem.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** newMarieRequestSystem.cpp 22 Sep 2004 20:24:52 -0000 1.1 --- newMarieRequestSystem.cpp 22 Sep 2004 20:29:54 -0000 1.2 *************** *** 77,81 **** m_dataID = addInput("DATA"); m_requestIDID = addInput("REQUEST_ID"); ! m_stateID = addInput("STATE_ID"); //outputs --- 77,81 ---- m_dataID = addInput("DATA"); m_requestIDID = addInput("REQUEST_ID"); ! m_stateID = addInput("STATE"); //outputs |