You can subscribe to this list here.
| 2008 |
Jan
|
Feb
(58) |
Mar
(15) |
Apr
(23) |
May
(8) |
Jun
(92) |
Jul
(66) |
Aug
(6) |
Sep
(9) |
Oct
(44) |
Nov
(8) |
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(10) |
Feb
(8) |
Mar
(2) |
Apr
(8) |
May
(19) |
Jun
(11) |
Jul
(8) |
Aug
(6) |
Sep
(5) |
Oct
(4) |
Nov
(26) |
Dec
(4) |
| 2010 |
Jan
(5) |
Feb
(3) |
Mar
(4) |
Apr
(3) |
May
(4) |
Jun
|
Jul
(1) |
Aug
(16) |
Sep
(7) |
Oct
(3) |
Nov
(7) |
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <bo...@us...> - 2008-09-13 06:01:14
|
Revision: 307
http://gearbox.svn.sourceforge.net/gearbox/?rev=307&view=rev
Author: borax00
Date: 2008-09-13 06:01:24 +0000 (Sat, 13 Sep 2008)
Log Message:
-----------
got rid of HYPOTENUSE definition after bug report from Rafal
Modified Paths:
--------------
gearbox/trunk/src/gbxutilacfr/mathdefs.h
Modified: gearbox/trunk/src/gbxutilacfr/mathdefs.h
===================================================================
--- gearbox/trunk/src/gbxutilacfr/mathdefs.h 2008-09-04 03:25:32 UTC (rev 306)
+++ gearbox/trunk/src/gbxutilacfr/mathdefs.h 2008-09-13 06:01:24 UTC (rev 307)
@@ -130,17 +130,10 @@
//dox For example, ROUND_TO(8,5) and ROUND_TO(12,5) will both result in 10.
#define ROUND_TO(n,d) (d*rint(n/d))
#endif
-//#ifndef SQR
-//#define SQR(x) ((x)*(x))
-//#endif
#ifndef SIGN
//dox Sign of a number.
#define SIGN(A) ((A)<0?(-1):(1))
#endif
-#ifndef HYPOTENEUSE
-//dox Finds hypoeneuse
-#define HYPOTENEUSE(a,b) (sqrt(SQR(a)+SQR(b)))
-#endif
#ifndef COS_LAW
//dox Law of cosines.
#define COS_LAW(side1, side2, theta) \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2008-09-04 03:25:23
|
Revision: 306
http://gearbox.svn.sourceforge.net/gearbox/?rev=306&view=rev
Author: gbiggs
Date: 2008-09-04 03:25:32 +0000 (Thu, 04 Sep 2008)
Log Message:
-----------
Added an SVG version of the logo
Added Paths:
-----------
gearbox/trunk/doc/images/gearbox_logo.png
gearbox/trunk/doc/images/gearbox_logo.svg
Property changes on: gearbox/trunk/doc/images/gearbox_logo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: gearbox/trunk/doc/images/gearbox_logo.svg
===================================================================
--- gearbox/trunk/doc/images/gearbox_logo.svg (rev 0)
+++ gearbox/trunk/doc/images/gearbox_logo.svg 2008-09-04 03:25:32 UTC (rev 306)
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="149.81343"
+ height="150"
+ id="svg3257"
+ sodipodi:version="0.32"
+ inkscape:version="0.46"
+ sodipodi:docname="gearbox_logo.svg"
+ inkscape:output_extension="org.inkscape.output.svg.inkscape"
+ version="1.0"
+ inkscape:export-filename="/home/geoff/research/src/gearbox/doc/images/gearbox_logo.png"
+ inkscape:export-xdpi="147.17999"
+ inkscape:export-ydpi="147.17999">
+ <defs
+ id="defs3259">
+ <inkscape:perspective
+ sodipodi:type="inkscape:persp3d"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ id="perspective3265" />
+ <inkscape:perspective
+ id="perspective3311"
+ inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+ inkscape:vp_z="744.09448 : 526.18109 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 526.18109 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="5.36"
+ inkscape:cx="74.906715"
+ inkscape:cy="75"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1680"
+ inkscape:window-height="1026"
+ inkscape:window-x="1680"
+ inkscape:window-y="0" />
+ <metadata
+ id="metadata3262">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-96.560257,-228.6667)">
+ <rect
+ style="fill:#6672d9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect4099"
+ width="149.81343"
+ height="150"
+ x="96.560257"
+ y="228.6667" />
+ <path
+ style="fill:#6b5647;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 87.222168,210.32693 L 216.27882,134.24508 L 311.31243,295.44942 L 182.25578,371.53125 L 87.222168,210.32693 z"
+ id="path3166" />
+ <path
+ style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 85.28125,-6.78125 C 79.76509,-6.9839438 80.698704,5.3060308 75.21875,5.96875 C 69.738796,6.631469 67.683813,-5.5118136 62.375,-4 C 57.066184,-2.4881861 61.725704,8.8950671 56.71875,11.21875 C 51.711795,13.542432 46.050558,2.6404156 41.46875,5.71875 C 36.886943,8.7970847 44.825092,18.180311 40.78125,21.9375 C 36.73741,25.694687 27.9688,17.062724 24.5625,21.40625 C 21.1562,25.749777 31.622385,32.239585 28.9375,37.0625 C 26.252615,41.885412 15.24111,36.378955 13.34375,41.5625 C 11.44639,46.746044 23.406867,49.677212 22.34375,55.09375 C 21.280634,60.510288 9.108944,58.702589 8.90625,64.21875 C 8.7035562,69.73491 20.962281,68.801296 21.625,74.28125 C 22.287719,79.761204 10.144436,81.784937 11.65625,87.09375 C 13.168064,92.402566 24.551318,87.743042 26.875,92.75 C 29.198682,97.756955 18.296665,103.44945 21.375,108.03125 C 24.453335,112.61306 33.836561,104.67491 37.59375,108.71875 C 41.350937,112.76259 32.750224,121.5312 37.09375,124.9375 C 41.437277,128.3438 47.895835,117.87762 52.71875,120.5625 C 57.541662,123.24739 52.066455,134.25889 57.25,136.15625 C 62.433544,138.05361 65.333462,126.09314 70.75,127.15625 C 76.166538,128.21937 74.358839,140.39105 79.875,140.59375 C 85.39116,140.79644 84.457546,128.53772 89.9375,127.875 C 95.417454,127.21228 97.472437,139.32431 102.78125,137.8125 C 108.09007,136.30069 103.43054,124.91743 108.4375,122.59375 C 113.44445,120.27007 119.1057,131.20334 123.6875,128.125 C 128.26931,125.04667 120.33116,115.66344 124.375,111.90625 C 128.41884,108.14906 137.18745,116.74978 140.59375,112.40625 C 144.00005,108.06272 133.53387,101.60416 136.21875,96.78125 C 138.90364,91.958338 149.91514,97.433541 151.8125,92.25 C 153.70986,87.066456 141.78064,84.166538 142.84375,78.75 C 143.90687,73.333462 156.04731,75.141161 156.25,69.625 C 156.45269,64.10884 144.19397,65.011204 143.53125,59.53125 C 142.86853,54.051296 155.01181,52.027563 153.5,46.71875 C 151.98819,41.409934 140.60494,46.069454 138.28125,41.0625 C 135.95757,36.055545 146.85958,30.363057 143.78125,25.78125 C 140.70292,21.199443 131.31969,29.16884 127.5625,25.125 C 123.80531,21.08116 132.43727,12.31255 128.09375,8.90625 C 123.75022,5.4999499 117.26041,15.966136 112.4375,13.28125 C 107.61459,10.596365 113.12104,-0.41514005 107.9375,-2.3125 C 102.75396,-4.2098604 99.822788,7.7193657 94.40625,6.65625 C 88.989712,5.5931342 90.797411,-6.578556 85.28125,-6.78125 z M 82.59375,51.84375 C 90.920504,51.843752 97.65625,58.5795 97.65625,66.90625 C 97.656253,75.232997 90.9205,82 82.59375,82 C 74.267003,82.000003 67.5,75.233 67.5,66.90625 C 67.499997,58.579496 74.267,51.84375 82.59375,51.84375 z"
+ transform="translate(93.909561,225.68521)"
+ id="path2388" />
+ <path
+ style="fill:#6b5647;fill-opacity:0.93333333;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 87.222169,210.32693 L 216.27882,134.24508 L 311.31243,295.44942 L 182.25578,371.53125 L 87.222169,210.32693 z"
+ id="rect3163" />
+ <text
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Serif;-inkscape-font-specification:DejaVu Serif"
+ x="-29.762228"
+ y="407.88449"
+ id="text4095"
+ sodipodi:linespacing="125%"
+ transform="matrix(0.8639023,-0.5036594,0.5036594,0.8639023,0,0)"><tspan
+ sodipodi:role="line"
+ id="tspan4097"
+ x="-29.762228"
+ y="407.88449">Box</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:DejaVu Serif;-inkscape-font-specification:DejaVu Serif"
+ x="121.08518"
+ y="268.45593"
+ id="text4091"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan4093"
+ x="121.08518"
+ y="268.45593"
+ style="font-size:40px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;font-family:DejaVu Serif;-inkscape-font-specification:DejaVu Serif">Gear</tspan></text>
+ </g>
+</svg>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <to...@us...> - 2008-08-12 04:43:33
|
Revision: 305
http://gearbox.svn.sourceforge.net/gearbox/?rev=305&view=rev
Author: tobasco
Date: 2008-08-12 04:43:37 +0000 (Tue, 12 Aug 2008)
Log Message:
-----------
comments
Modified Paths:
--------------
gearbox/trunk/src/gbxsmartbatteryacfr/oceanserver.h
gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverparser.cpp
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/oceanserver.h
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/oceanserver.h 2008-08-12 02:30:41 UTC (rev 304)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/oceanserver.h 2008-08-12 04:43:37 UTC (rev 305)
@@ -30,6 +30,8 @@
{
public:
+ //! Initialises an OceanServerReader
+ //! May throw a HardwareReadingException
OceanServer( const std::string &port,
gbxutilacfr::Tracer &tracer);
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverparser.cpp
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverparser.cpp 2008-08-12 02:30:41 UTC (rev 304)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverparser.cpp 2008-08-12 04:43:37 UTC (rev 305)
@@ -284,15 +284,14 @@
const string &line = stringList[i];
stringstream filteredStream;
- bool haveBinary = false;
for (unsigned int k=0; k<line.size()-2; k++)
{
- // Sometimes we get binary characters in the string: either caused by dodgy serial ports
- // or by the oceanserver controller. We need to remove those.
+ // It is possible that binary characters enter the stream,
+ // e.g. caused by electrical interference or dodgy serial ports.
+ // We try to remove those.
if ( !iscntrl( line[k] ) ) {
filteredStream << line[k];
- haveBinary = true;
} else {
unsigned int charValue = (unsigned int)line[k];
stringstream ss;
@@ -305,7 +304,7 @@
// divide the filteredString into 2 parts: data and checksum (if present)
vector<string> checksumList = gbxutilacfr::tokenise( filteredString, "%" );
- if ( (checksumList.size()==2) && (!haveBinary) )
+ if ( checksumList.size()==2 )
{
// we have a checksum, is it correct?
if (!isChecksumValid( checksumList[0], checksumList[1] ) )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2008-08-12 02:30:31
|
Revision: 304
http://gearbox.svn.sourceforge.net/gearbox/?rev=304&view=rev
Author: gbiggs
Date: 2008-08-12 02:30:41 +0000 (Tue, 12 Aug 2008)
Log Message:
-----------
Fixed some bugs in the handling of SCIP v1 device information.
Modified Paths:
--------------
gearbox/trunk/src/flexiport/port.h
gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
gearbox/trunk/src/hokuyo_aist/test/example.cpp
Modified: gearbox/trunk/src/flexiport/port.h
===================================================================
--- gearbox/trunk/src/flexiport/port.h 2008-08-10 02:31:56 UTC (rev 303)
+++ gearbox/trunk/src/flexiport/port.h 2008-08-12 02:30:41 UTC (rev 304)
@@ -4,17 +4,17 @@
* Copyright (c) 2008 Geoffrey Biggs
*
* flexiport flexible hardware data communications library.
- *
- * This distribution is licensed to you under the terms described in the LICENSE file included in
+ *
+ * This distribution is licensed to you under the terms described in the LICENSE file included in
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
* Japan. Registration number: H20PRO-881
- *
+ *
* This file is part of flexiport.
*
* flexiport 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 3 of
+ * Lesser General Public License as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* flexiport is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
@@ -154,7 +154,7 @@
/** @brief Read a new-line terminated string of data.
A convenience function that reads until a newline character (\\n, 0x0A) is received and
- stores the received data in a caller-provided buffer, @ref buffer. Good for text-based
+ stores the received data in a caller-provided buffer, @ref buffer. Good for text-based
protocols that use newlines as message terminators. Will not read more than @ref count
bytes.
@@ -166,10 +166,10 @@
strlen ()).
@note This function makes many calls to Read, each of which has an individual timeout. The
- maximum length of time this function make take may therefore be longer than one timeout.
+ maximum length of time this function may take may therefore be longer than one timeout.
@note If the port is set to non-blocking mode (by setting the timeout to zero), this will
- effectively timeout immediatly when there is no data available, returning -1 irrespective of
+ effectively timeout immediately when there is no data available, returning -1 irrespective of
the quantity of data actually received before that point.
@return The length of the string (including the new line), or -1 if a timeout occured. */
@@ -180,7 +180,7 @@
A convenience function that reads until a newline character (\\n, 0x0A) is received and
stores the received data in a string, @buffer. Good for text-based protocols that use
newlines as message terminators.
-
+
@note This function makes many calls to Read, each of which has an individual timeout. The
maximum length of time this function make take may therefore be longer than one timeout.
@@ -268,7 +268,7 @@
/** @brief Set the timeout value. Set seconds to -1 to disable timeouts and block forever.
@note On Mac OS X, the timer is reset each time data is received, making the timeout an
- inactivity timer in that there must be no data at all for the length of the timeout for it
+ inactivity timer in that there must be no data at all for the length of the timeout for it
to trigger. This can potentially lead to very long blocking if the sender is sending data
slightly faster than the timeout. */
virtual void SetTimeout (Timeout timeout) = 0;
Modified: gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
===================================================================
--- gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2008-08-10 02:31:56 UTC (rev 303)
+++ gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2008-08-12 02:30:41 UTC (rev 304)
@@ -1165,7 +1165,7 @@
info->serial = &buffer[5];
// Get either the status line or the end of message
ReadLine (buffer);
- if (buffer[0] != '\n')
+ if (buffer[0] != '\0')
{
// Got a status line
info->sensorDiagnostic = &buffer[5];
@@ -1191,7 +1191,7 @@
}
// Now put it through sscanf and hope...
int aperture;
- int numFound = sscanf (valueStart, "%d-%d[mm],%d[deg],%d-%d[step],%d[rpm]",
+ int numFound = sscanf (valueStart, "(%d-%d[mm],%d[deg],%d-%d[step],%d[rpm]",
&info->minRange, &info->maxRange, &aperture,
&info->firstStep, &info->lastStep, &info->speed);
if (numFound != 6)
@@ -1201,19 +1201,28 @@
info->CalculateValues ();
if (_verbose)
{
- cerr << "Retrieved sensor info (hard-coded):" << endl;
+ cerr << "Retrieved sensor info (hard-coded, not enough values):" << endl;
cerr << info->AsString ();
}
}
+ else
+ {
+ // Need to calculate stuff differently since it gave us an aperture value
+ info->resolution = DTOR (static_cast<double> (aperture)) /
+ static_cast<double> (info->lastStep - info->firstStep);
+ // Assume that the range is evenly spread
+ info->scanableSteps = info->lastStep - info->firstStep + 1;
+ info->frontStep = info->scanableSteps / 2 + info->firstStep - 1;
+ info->minAngle = (static_cast<int> (info->firstStep) -
+ static_cast<int> (info->frontStep)) * info->resolution;
+ info->maxAngle = (info->lastStep - info->frontStep) * info->resolution;
- // Need to calculate stuff differently since it gave us an aperture value
- info->resolution = static_cast<double> (aperture) /
- static_cast<double> (info->lastStep - info->firstStep);
- // Assume that the range is evenly spread
- info->scanableSteps = info->lastStep - info->firstStep + 1;
- info->frontStep = info->scanableSteps / 2;
- info->minAngle = (info->firstStep - info->frontStep) * info->resolution;
- info->maxAngle = (info->lastStep - info->frontStep) * info->resolution;
+ if (_verbose)
+ {
+ cerr << "Retrieved sensor info (from FIRM line):" << endl;
+ cerr << info->AsString ();
+ }
+ }
}
else
{
Modified: gearbox/trunk/src/hokuyo_aist/test/example.cpp
===================================================================
--- gearbox/trunk/src/hokuyo_aist/test/example.cpp 2008-08-10 02:31:56 UTC (rev 303)
+++ gearbox/trunk/src/hokuyo_aist/test/example.cpp 2008-08-12 02:30:41 UTC (rev 304)
@@ -118,7 +118,14 @@
cerr << "Failed to change baud rate: (" << e.Code () << ") " << e.what () << endl;
}
// Set the motor speed
- laser.SetMotorSpeed (speed);
+ try
+ {
+ laser.SetMotorSpeed (speed);
+ }
+ catch (hokuyo_aist::HokuyoError e)
+ {
+ cerr << "Failed to set motor speed: (" << e.Code () << ") " << e.what () << endl;
+ }
// Get some laser info
cout << "Laser sensor information:" << endl;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-08-10 02:31:48
|
Revision: 303
http://gearbox.svn.sourceforge.net/gearbox/?rev=303&view=rev
Author: russo2503v
Date: 2008-08-10 02:31:56 +0000 (Sun, 10 Aug 2008)
Log Message:
-----------
turned off debug messages, added quiet option to the test program
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/driver.cpp
gearbox/trunk/src/gbxgarminacfr/nmea.cpp
gearbox/trunk/src/gbxgarminacfr/test/test.cpp
Modified: gearbox/trunk/src/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-08-08 05:41:39 UTC (rev 302)
+++ gearbox/trunk/src/gbxgarminacfr/driver.cpp 2008-08-10 02:31:56 UTC (rev 303)
@@ -344,8 +344,8 @@
nmeaExceptionCount = 0;
// debug
- if ( nmeaFailChecksumCount>0 )
- cout<<now.tv_sec<<" "<<now.tv_usec<<" "<<nmeaFailChecksumCount<<" the sentence AFTER, raw='"<<serialData<<"'"<<endl<<endl;
+// if ( nmeaFailChecksumCount>0 )
+// cout<<now.tv_sec<<" "<<now.tv_usec<<" "<<nmeaFailChecksumCount<<" the sentence AFTER, raw='"<<serialData<<"'"<<endl<<endl;
// Only populate the data structures if our message passes the checksum!
const int nmeaFailChecksumMaxCount = 10;
@@ -354,7 +354,8 @@
if ( nmeaFailChecksumCount++ < nmeaFailChecksumMaxCount ) {
// tracer_.warning("Gps driver: Single message failed checksum. Not throwing an exception yet!" );
// debug
- cout<<now.tv_sec<<" "<<now.tv_usec<<" "<<nmeaFailChecksumCount<<" sentence='"<<nmeaMessage.sentence()<<"' raw='"<<serialData<<"'"<<endl;
+ cout<<now.tv_sec<<" "<<now.tv_usec<<" "<<nmeaFailChecksumCount<<endl;
+// <<" sentence='"<<nmeaMessage.sentence()<<"' raw='"<<serialData<<"'"<<endl;
continue;
}
else {
Modified: gearbox/trunk/src/gbxgarminacfr/nmea.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/nmea.cpp 2008-08-08 05:41:39 UTC (rev 302)
+++ gearbox/trunk/src/gbxgarminacfr/nmea.cpp 2008-08-10 02:31:56 UTC (rev 303)
@@ -124,7 +124,7 @@
//These are straight after the '*' character
ptr = strchr(sentence_, NMEAChecksumDelim);
if ( !ptr ) {
- cout<<"device: no checksum delimiter"<<endl;
+// cout<<"device: no checksum delimiter"<<endl;
return false;
}
@@ -150,8 +150,8 @@
}
//failed the checksum!
- cout<<"device: '"<<chksum_HIB<<chksum_LOB <<"' ("<<std::hex<<(unsigned int)chksum_HIB<<","<<(unsigned int)chksum_LOB<<std::dec<<") "
- <<"driver: '"<<*ptr<<*(ptr+1)<<"'" <<"' ("<<std::hex<<(unsigned int)*ptr<<","<<(unsigned int)*(ptr+1)<<std::dec<<") "<<endl;
+// cout<<"device: '"<<chksum_HIB<<chksum_LOB <<"' ("<<std::hex<<(unsigned int)chksum_HIB<<","<<(unsigned int)chksum_LOB<<std::dec<<") "
+// <<"driver: '"<<*ptr<<*(ptr+1)<<"'" <<"' ("<<std::hex<<(unsigned int)*ptr<<","<<(unsigned int)*(ptr+1)<<std::dec<<") "<<endl;
return false;
}
Modified: gearbox/trunk/src/gbxgarminacfr/test/test.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/test/test.cpp 2008-08-08 05:41:39 UTC (rev 302)
+++ gearbox/trunk/src/gbxgarminacfr/test/test.cpp 2008-08-10 02:31:56 UTC (rev 303)
@@ -31,18 +31,23 @@
int opt;
// defaults
string port = "/dev/ttyS0";
+ bool quiet = false;
// Get some options from the command line
- while ((opt = getopt(argc, argv, "p:")) != -1)
+ while ((opt = getopt(argc, argv, "p:q")) != -1)
{
switch ( opt )
{
case 'p':
port = optarg;
break;
+ case 'q':
+ quiet = true;
+ break;
default:
cout << "Usage: " << argv[0] << " [-p port]" << endl << endl
- << "-p port\tPort the device is connected to. E.g. /dev/ttyS0" << endl;
+ << "-p port\tPort the device is connected to. E.g. /dev/ttyS0"
+ << "-q \tMakes normal operation quiet, only errors are traced." << endl;
return 1;
}
}
@@ -61,7 +66,9 @@
cout << "Using configuration: " << config.toString() << endl;
// Instantiate objects to handle messages from the driver
- const bool debug = true;
+ bool debug = true;
+ if ( quiet )
+ debug = false;
gbxutilacfr::TrivialTracer tracer( debug );
gbxutilacfr::TrivialStatus status( tracer );
@@ -81,7 +88,7 @@
std::auto_ptr<gbxgarminacfr::GenericData> data;
// Read a few times
- const int numReads = 30;
+ const int numReads = 30 + 10000000;
for ( int i=0; i < numReads; i++ )
{
try
@@ -94,25 +101,31 @@
case gbxgarminacfr::GpGga :
{
gbxgarminacfr::GgaData* d = (gbxgarminacfr::GgaData*)data.get();
- cout<<"GPGGA:"<<endl
- <<" satellites = "<<d->satellites<<endl
- <<" fix type = "<<d->fixType<<endl
- <<" longitude = "<<d->longitude<<endl
- <<" latitude = "<<d->latitude<<endl;
+ if ( !quiet ) {
+ cout<<"GPGGA:"<<endl
+ <<" satellites = "<<d->satellites<<endl
+ <<" fix type = "<<d->fixType<<endl
+ <<" longitude = "<<d->longitude<<endl
+ <<" latitude = "<<d->latitude<<endl;
+ }
break;
}
case gbxgarminacfr::GpVtg :
{
gbxgarminacfr::VtgData* d = (gbxgarminacfr::VtgData*)data.get();
- cout<<"GPVTG:"<<endl
- <<" speed = "<<d->speed<<endl;
+ if ( !quiet ) {
+ cout<<"GPVTG:"<<endl
+ <<" speed = "<<d->speed<<endl;
+ }
break;
}
case gbxgarminacfr::PgRme :
{
gbxgarminacfr::RmeData* d = (gbxgarminacfr::RmeData*)data.get();
- cout<<"PGRME:"<<endl
- <<" horiz error = "<<d->horizontalPositionError<<endl;
+ if ( !quiet ) {
+ cout<<"PGRME:"<<endl
+ <<" horiz error = "<<d->horizontalPositionError<<endl;
+ }
break;
}
default :
@@ -121,7 +134,8 @@
// no need to delete the data object, the auto pointer will delete it automatically
- cout<<"Test: Got data "<<i+1<<" of "<<numReads<<endl;
+ if ( !quiet )
+ cout<<"Test: Got data "<<i+1<<" of "<<numReads<<endl;
}
catch ( const std::exception& e )
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <to...@us...> - 2008-08-08 05:41:30
|
Revision: 302
http://gearbox.svn.sourceforge.net/gearbox/?rev=302&view=rev
Author: tobasco
Date: 2008-08-08 05:41:39 +0000 (Fri, 08 Aug 2008)
Log Message:
-----------
removing binary characters now
Modified Paths:
--------------
gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverparser.cpp
gearbox/trunk/src/gbxsmartbatteryacfr/smartbatteryacfr.dox
gearbox/trunk/src/gbxsmartbatteryacfr/test/CMakeLists.txt
gearbox/trunk/src/gbxsmartbatteryacfr/test/example.readme
Added Paths:
-----------
gearbox/trunk/src/gbxsmartbatteryacfr/test/longtest.cpp
gearbox/trunk/src/gbxsmartbatteryacfr/test/shorttest.cpp
Removed Paths:
-------------
gearbox/trunk/src/gbxsmartbatteryacfr/test/test.cpp
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverparser.cpp
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverparser.cpp 2008-08-08 02:51:04 UTC (rev 301)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverparser.cpp 2008-08-08 05:41:39 UTC (rev 302)
@@ -8,6 +8,7 @@
*
*/
+#include <iostream>
#include <sstream>
#include <gbxutilacfr/tokenise.h>
#include <gbxsmartbatteryacfr/exceptions.h>
@@ -259,46 +260,53 @@
if (tracer_.verbosity( gbxutilacfr::Tracer::DebugTrace, gbxutilacfr::Tracer::ToAny ) >= debugLevel)
{
stringstream ss;
- ss << "OceanServerParser: Received the following input: " << endl;
for (unsigned int i=0; i<stringList.size(); i++)
{
const string &str = stringList[i];
- ss << i << ": " << str;
-
- // output in hex
- ss << i << " hex: ";
- for (unsigned k=0; k<str.size(); k++)
+ ss << "Line: " << str;
+ for (unsigned k=0; k<str.size()-2; k++)
{
unsigned int charValue = (unsigned int)str[k];
- ss << str[k] << ": " << std::hex << charValue << " ";
+ ss << "Character (str/hex): " << str[k] << "/" << std::hex << charValue << endl;
}
- ss << std::dec;
-
+ ss << std::dec << endl;
}
ss << endl;
tracer_.debug( ss.str(), debugLevel );
- }
+ }
+
//
// Parsing
//
for (unsigned int i=0; i<stringList.size(); i++)
{
const string &line = stringList[i];
-
- // Known problem with oceanserver system: sometimes \0 is inserted in the middle of the string.
- // To get around this, we check for 'control characters' in the string.
- // Don't check the last 2 characters of the string: they're \0 and \n.
+
+ stringstream filteredStream;
+ bool haveBinary = false;
+
for (unsigned int k=0; k<line.size()-2; k++)
- {
- if ( iscntrl( line[k] ) )
- throw ParsingException( ERROR_INFO, "Found a control character (binary) in the string!" );
+ {
+ // Sometimes we get binary characters in the string: either caused by dodgy serial ports
+ // or by the oceanserver controller. We need to remove those.
+ if ( !iscntrl( line[k] ) ) {
+ filteredStream << line[k];
+ haveBinary = true;
+ } else {
+ unsigned int charValue = (unsigned int)line[k];
+ stringstream ss;
+ ss << "Found a binary character in the following line: " << endl << line;
+ ss << "The character is: " << std::hex << charValue << ". Will remove it.";
+ tracer_.warning( ss.str() );
+ }
}
-
- // divide the line into 2 parts: data and checksum (if present)
- vector<string> checksumList = gbxutilacfr::tokenise( line, "%" );
- if (checksumList.size()==2)
- {
+ string filteredString = filteredStream.str();
+
+ // divide the filteredString into 2 parts: data and checksum (if present)
+ vector<string> checksumList = gbxutilacfr::tokenise( filteredString, "%" );
+ if ( (checksumList.size()==2) && (!haveBinary) )
+ {
// we have a checksum, is it correct?
if (!isChecksumValid( checksumList[0], checksumList[1] ) )
throw ParsingException( ERROR_INFO, "Checksum failed!" );
@@ -310,6 +318,7 @@
vector<string> fields = gbxutilacfr::tokenise( checksumList[0], "," );
parseFields( fields, batterySystem );
}
+
}
}
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/smartbatteryacfr.dox
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/smartbatteryacfr.dox 2008-08-08 02:51:04 UTC (rev 301)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/smartbatteryacfr.dox 2008-08-08 05:41:39 UTC (rev 302)
@@ -27,7 +27,7 @@
@endverbatim
@par Examples
-- See 'test/test.cpp' for a simple example of how to use the library. The test makes use of the 'oceanserver' class to read a few records from the oceanserver system and prints the results on the screen.
+- See 'test/shorttest.cpp' for a simple example of how to use the library. The test makes use of the 'oceanserver' class to read a few records from the oceanserver system and prints the results on the screen.
@par Style
See http://orca-robotics.sourceforge.net/orca/orca_doc_style.html
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/test/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/test/CMakeLists.txt 2008-08-08 02:51:04 UTC (rev 301)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/test/CMakeLists.txt 2008-08-08 05:41:39 UTC (rev 302)
@@ -1,10 +1,13 @@
INCLUDE( ${GBX_CMAKE_DIR}/UseBasicRules.cmake )
-GBX_ADD_EXECUTABLE( gbxsmartbatteryacfrtest test.cpp )
-TARGET_LINK_LIBRARIES( gbxsmartbatteryacfrtest GbxSmartBatteryAcfr )
+GBX_ADD_EXECUTABLE( gbxsmartbatteryshorttest shorttest.cpp )
+TARGET_LINK_LIBRARIES( gbxsmartbatteryshorttest GbxSmartBatteryAcfr )
-GBX_ADD_EXAMPLE( gbxsmartbatteryacfrtest example.cmake.in example.cmake test.cpp example.readme )
+GBX_ADD_EXECUTABLE( gbxsmartbatterylongtest longtest.cpp )
+TARGET_LINK_LIBRARIES( gbxsmartbatterylongtest GbxSmartBatteryAcfr )
+GBX_ADD_EXAMPLE( gbxsmartbatteryshorttest example.cmake.in example.cmake shorttest.cpp example.readme )
+
IF( GBX_BUILD_TESTS )
ADD_SUBDIRECTORY( darttest )
ENDIF( GBX_BUILD_TESTS )
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/test/example.readme
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/test/example.readme 2008-08-08 02:51:04 UTC (rev 301)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/test/example.readme 2008-08-08 05:41:39 UTC (rev 302)
@@ -12,6 +12,6 @@
$ ccmake /usr/local/share/gearbox/gbxsmartbatteryacfr
(press 'c' and 'g')
$ make
-$ ./gbxsmartbatteryacfrtest
+$ ./gbxsmartbatteryshorttest
See the library documentation (smartbatteryacfr.dox) for a description of the test.
Added: gearbox/trunk/src/gbxsmartbatteryacfr/test/longtest.cpp
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/test/longtest.cpp (rev 0)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/test/longtest.cpp 2008-08-08 05:41:39 UTC (rev 302)
@@ -0,0 +1,72 @@
+#include <iostream>
+#include <gbxutilacfr/trivialtracer.h>
+#include <gbxsmartbatteryacfr/gbxsmartbatteryacfr.h>
+
+using namespace std;
+
+int main( int argc, char **argv )
+{
+ int opt;
+ std::string port = "/dev/ttyS0";
+ bool debug = false;
+
+ // Get some options from the command line
+ while ((opt = getopt(argc, argv, "p:v")) != -1)
+ {
+ switch ( opt )
+ {
+ case 'p':
+ port = optarg;
+ break;
+ case 'v':
+ debug = true;
+ break;
+ default:
+ cout << "Usage: " << argv[0] << " [-p port] [-v(erbose)]" << endl
+ << "-p port\tPort the oceanserver battery system is connected to. E.g. /dev/ttyS0" << endl;
+ return 1;
+ }
+ }
+
+ int numRecords = 0;
+ gbxutilacfr::TrivialTracer tracer( debug );
+
+ try
+ {
+ gbxsmartbatteryacfr::OceanServer oceanserver( port, tracer );
+
+ while (true)
+ {
+ gbxsmartbatteryacfr::OceanServerSystem data = oceanserver.getData();
+
+ cout << "TRACE(test): Reading record " << numRecords << endl;
+ numRecords++;
+ }
+ }
+ catch ( gbxsmartbatteryacfr::HardwareReadingException &e )
+ {
+ cout << "ERROR(test): Caught a hardware reading exception: "
+ << e.what() << endl
+ << "This shouldn't happen!" << endl;
+ return 1;
+ }
+ catch ( gbxutilacfr::Exception &e )
+ {
+ cout << "ERROR(test): Caught a gbxutilacfr::Exception: "
+ << e.what() << endl
+ << "This shouldn't happen!" << endl;
+ return 1;
+ }
+ catch ( std::exception &e )
+ {
+ cout << "ERROR(test): Caught an unknown exception: "
+ << e.what() << endl
+ << "This shouldn't happen!" << endl;
+ return 1;
+ }
+
+ cout << "INFO(test): Successfully read " << numRecords << " records." << endl;
+
+ return 0;
+}
+
Copied: gearbox/trunk/src/gbxsmartbatteryacfr/test/shorttest.cpp (from rev 299, gearbox/trunk/src/gbxsmartbatteryacfr/test/test.cpp)
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/test/shorttest.cpp (rev 0)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/test/shorttest.cpp 2008-08-08 05:41:39 UTC (rev 302)
@@ -0,0 +1,75 @@
+#include <iostream>
+#include <gbxutilacfr/trivialtracer.h>
+#include <gbxsmartbatteryacfr/gbxsmartbatteryacfr.h>
+
+using namespace std;
+
+int main( int argc, char **argv )
+{
+ int opt;
+ std::string port = "/dev/ttyS0";
+ bool debug = false;
+
+ // Get some options from the command line
+ while ((opt = getopt(argc, argv, "p:v")) != -1)
+ {
+ switch ( opt )
+ {
+ case 'p':
+ port = optarg;
+ break;
+ case 'v':
+ debug = true;
+ break;
+ default:
+ cout << "Usage: " << argv[0] << " [-p port] [-v(erbose)]" << endl
+ << "-p port\tPort the oceanserver battery system is connected to. E.g. /dev/ttyS0" << endl;
+ return 1;
+ }
+ }
+
+ const unsigned int numRecords = 5;
+ cout << "INFO(test): The plan is to read " << numRecords << " records from the oceanserver system and display the results." << endl << endl;
+
+ gbxutilacfr::TrivialTracer tracer( debug );
+
+ try
+ {
+ gbxsmartbatteryacfr::OceanServer oceanserver( port, tracer );
+
+ for (unsigned int i=0; i<=numRecords; i++)
+ {
+ gbxsmartbatteryacfr::OceanServerSystem data = oceanserver.getData();
+
+ cout << "TRACE(test): Reading record " << i << ": " << endl
+ << "=================================" << endl << endl
+ << gbxsmartbatteryacfr::toString( data ) << endl;
+ }
+ }
+ catch ( gbxsmartbatteryacfr::HardwareReadingException &e )
+ {
+ cout << "ERROR(test): Caught a hardware reading exception: "
+ << e.what() << endl
+ << "This shouldn't happen!" << endl;
+ return 1;
+ }
+ catch ( gbxutilacfr::Exception &e )
+ {
+ cout << "ERROR(test): Caught a gbxutilacfr::Exception: "
+ << e.what() << endl
+ << "This shouldn't happen!" << endl;
+ return 1;
+ }
+ catch ( std::exception &e )
+ {
+ cout << "ERROR(test): Caught an unknown exception: "
+ << e.what() << endl
+ << "This shouldn't happen!" << endl;
+ return 1;
+ }
+
+ cout << "INFO(test): Successfully read " << numRecords << " records." << endl;
+
+ return 0;
+}
+
Property changes on: gearbox/trunk/src/gbxsmartbatteryacfr/test/shorttest.cpp
___________________________________________________________________
Added: svn:mergeinfo
+
Deleted: gearbox/trunk/src/gbxsmartbatteryacfr/test/test.cpp
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/test/test.cpp 2008-08-08 02:51:04 UTC (rev 301)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/test/test.cpp 2008-08-08 05:41:39 UTC (rev 302)
@@ -1,75 +0,0 @@
-#include <iostream>
-#include <gbxutilacfr/trivialtracer.h>
-#include <gbxsmartbatteryacfr/gbxsmartbatteryacfr.h>
-
-using namespace std;
-
-int main( int argc, char **argv )
-{
- int opt;
- std::string port = "/dev/ttyS0";
- bool debug = false;
-
- // Get some options from the command line
- while ((opt = getopt(argc, argv, "p:")) != -1)
- {
- switch ( opt )
- {
- case 'p':
- port = optarg;
- break;
- case 'v':
- debug = true;
- break;
- default:
- cout << "Usage: " << argv[0] << " [-p port] [-v(erbose)]" << endl
- << "-p port\tPort the oceanserver battery system is connected to. E.g. /dev/ttyS0" << endl;
- return 1;
- }
- }
-
- const unsigned int numRecords = 5;
- cout << "INFO(test): The plan is to read " << numRecords << " records from the oceanserver system and display the results." << endl << endl;
-
- gbxutilacfr::TrivialTracer tracer( debug );
-
- try
- {
- gbxsmartbatteryacfr::OceanServer oceanserver( port, tracer );
-
- for (unsigned int i=0; i<=numRecords; i++)
- {
- gbxsmartbatteryacfr::OceanServerSystem data = oceanserver.getData();
-
- cout << "TRACE(test): Reading record " << i << ": " << endl
- << "=================================" << endl << endl
- << gbxsmartbatteryacfr::toString( data ) << endl;
- }
- }
- catch ( gbxsmartbatteryacfr::HardwareReadingException &e )
- {
- cout << "ERROR(test): Caught a hardware reading exception: "
- << e.what() << endl
- << "This shouldn't happen!" << endl;
- return 1;
- }
- catch ( gbxutilacfr::Exception &e )
- {
- cout << "ERROR(test): Caught a gbxutilacfr::Exception: "
- << e.what() << endl
- << "This shouldn't happen!" << endl;
- return 1;
- }
- catch ( std::exception &e )
- {
- cout << "ERROR(test): Caught an unknown exception: "
- << e.what() << endl
- << "This shouldn't happen!" << endl;
- return 1;
- }
-
- cout << "INFO(test): Successfully read " << numRecords << " records." << endl;
-
- return 0;
-}
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2008-08-08 02:50:55
|
Revision: 301
http://gearbox.svn.sourceforge.net/gearbox/?rev=301&view=rev
Author: gbiggs
Date: 2008-08-08 02:51:04 +0000 (Fri, 08 Aug 2008)
Log Message:
-----------
Added Python bindings for hokuyo_aist. Small change to the API to resolve some ambiguity in overloads.
Modified Paths:
--------------
gearbox/trunk/src/hokuyo_aist/CMakeLists.txt
gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
gearbox/trunk/src/hokuyo_aist/hokuyo_aist.h
gearbox/trunk/src/hokuyo_aist/test/example.cpp
Added Paths:
-----------
gearbox/trunk/src/hokuyo_aist/python/
gearbox/trunk/src/hokuyo_aist/python/CMakeLists.txt
gearbox/trunk/src/hokuyo_aist/python/hokuyo_aist.cpp
gearbox/trunk/src/hokuyo_aist/python/test/
gearbox/trunk/src/hokuyo_aist/python/test/CMakeLists.txt
gearbox/trunk/src/hokuyo_aist/python/test/hokuyo_aist_example.py
Modified: gearbox/trunk/src/hokuyo_aist/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/hokuyo_aist/CMakeLists.txt 2008-08-06 00:37:42 UTC (rev 300)
+++ gearbox/trunk/src/hokuyo_aist/CMakeLists.txt 2008-08-08 02:51:04 UTC (rev 301)
@@ -26,4 +26,9 @@
IF (GBX_BUILD_TESTS)
ADD_SUBDIRECTORY (test)
ENDIF (GBX_BUILD_TESTS)
-ENDIF( build )
+
+ OPTION (HOKUYO_AIST_BUILD_BINDINGS "Build the Python bindings for Hokuyo_aist" ON)
+ IF (HOKUYO_AIST_BUILD_BINDINGS)
+ ADD_SUBDIRECTORY (python)
+ ENDIF (HOKUYO_AIST_BUILD_BINDINGS)
+ENDIF (build)
Modified: gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
===================================================================
--- gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2008-08-06 00:37:42 UTC (rev 300)
+++ gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2008-08-08 02:51:04 UTC (rev 301)
@@ -1434,7 +1434,7 @@
return data->_length;
}
-unsigned int HokuyoLaser::GetRanges (HokuyoData *data, double startAngle,
+unsigned int HokuyoLaser::GetRangesByAngle (HokuyoData *data, double startAngle,
double endAngle, unsigned int clusterCount)
{
if (data == NULL)
@@ -1549,7 +1549,7 @@
return data->_length;
}
-unsigned int HokuyoLaser::GetNewRanges (HokuyoData *data, double startAngle, double endAngle,
+unsigned int HokuyoLaser::GetNewRangesByAngle (HokuyoData *data, double startAngle, double endAngle,
unsigned int clusterCount)
{
if (data == NULL)
@@ -1670,7 +1670,7 @@
return data->_length;
}
-unsigned int HokuyoLaser::GetNewRangesAndIntensities (HokuyoData *data, double startAngle,
+unsigned int HokuyoLaser::GetNewRangesAndIntensitiesByAngle (HokuyoData *data, double startAngle,
double endAngle, unsigned int clusterCount)
{
if (data == NULL)
Modified: gearbox/trunk/src/hokuyo_aist/hokuyo_aist.h
===================================================================
--- gearbox/trunk/src/hokuyo_aist/hokuyo_aist.h 2008-08-06 00:37:42 UTC (rev 300)
+++ gearbox/trunk/src/hokuyo_aist/hokuyo_aist.h 2008-08-08 02:51:04 UTC (rev 301)
@@ -252,7 +252,7 @@
/// @brief Get the number of samples in the data.
unsigned int Length (void) const { return _length; }
/** @brief Indicates if one or more steps had an error.
-
+
A step's value will be less than 20 if it had an error. Use @ref ErrorCodeToString to get
a textual representation of the error. */
bool GetErrorStatus (void) const { return _error; }
@@ -273,7 +273,7 @@
/// @brief Force the data to clean up.
void CleanUp (void);
- private:
+ protected:
uint32_t *_ranges;
uint32_t *_intensities;
unsigned int _length;
@@ -330,7 +330,7 @@
(startup) value. Values between 1 and 10 specify a ratio of the default speed. The speeds in
revolutions per minute that these correspond to will depend on the scanner model. For
example, for a URG-04LX, they are (from 1 to 10) 594, 588, 576, 570, 564, 558, 552, 546, and
- 540 rpm.
+ 540 rpm.
Not available with the SCIP v1 protocol. */
void SetMotorSpeed (unsigned int speed);
@@ -381,7 +381,7 @@
@param clusterCount The number of readings to cluster together into a single reading. The
minimum value from a cluster is returned as the range for that cluster.
@return The number of range readings read into @ref data. */
- unsigned int GetRanges (HokuyoData *data, double startAngle, double endAngle,
+ unsigned int GetRangesByAngle (HokuyoData *data, double startAngle, double endAngle,
unsigned int clusterCount = 1);
/** @brief Get a new scan from the scanner.
@@ -390,7 +390,7 @@
will request a new scan. This means it will wait while the scanner performs the scan, which
means the rate at which scans can be retrieved using this function is less than with @ref
GetRanges. Otherwise behaves identicallty to @ref GetRanges.
-
+
Not available with the SCIP v1 protocol.
@note The command used to retrieve a fresh scan is also used for the continuous scanning
@@ -420,7 +420,7 @@
@param clusterCount The number of readings to cluster together into a single reading. The
minimum value from a cluster is returned as the range for that cluster.
@return The number of range readings read into @ref data. */
- unsigned int GetNewRanges (HokuyoData *data, double startAngle, double endAngle,
+ unsigned int GetNewRangesByAngle (HokuyoData *data, double startAngle, double endAngle,
unsigned int clusterCount = 1);
/** @brief Get a new scan from the scanner with intensity data.
@@ -458,7 +458,7 @@
@param clusterCount The number of readings to cluster together into a single reading. The
minimum value from a cluster is returned as the range for that cluster.
@return The number of range readings read into @ref data. */
- unsigned int GetNewRangesAndIntensities (HokuyoData *data, double startAngle,
+ unsigned int GetNewRangesAndIntensitiesByAngle (HokuyoData *data, double startAngle,
double endAngle, unsigned int clusterCount = 1);
/// @brief Return the major version of the SCIP protocol in use.
Added: gearbox/trunk/src/hokuyo_aist/python/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/hokuyo_aist/python/CMakeLists.txt (rev 0)
+++ gearbox/trunk/src/hokuyo_aist/python/CMakeLists.txt 2008-08-08 02:51:04 UTC (rev 301)
@@ -0,0 +1,67 @@
+# Find the Python libraries and headers
+FIND_PACKAGE (PythonLibs)
+IF (NOT PYTHON_LIBRARIES)
+ MESSAGE (STATUS "Python libaries not found. Cannot build Python bindings for Hokuyo_aist.")
+ENDIF (NOT PYTHON_LIBRARIES)
+
+# Find Boost::Python
+# There is a new, much better, FindBoost.cmake in 2.6
+IF (CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6)
+ OPTION (Boost_USE_STATIC_LIBS "Use the static versions of the Boost libraries" OFF)
+ MARK_AS_ADVANCED (Boost_USE_STATIC_LIBS)
+
+ SET (BOOST_COMPONENTS python)
+ FIND_PACKAGE (Boost COMPONENTS ${BOOST_COMPONENTS})
+ IF (Boost_FOUND)
+ INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIR})
+ LINK_DIRECTORIES (${Boost_LIBRARY_DIRS})
+
+ IF (Boost_PYTHON_FOUND)
+ GET_FILENAME_COMPONENT (boostPythonLib ${Boost_PYTHON_LIBRARY} NAME_WE CACHE)
+ # Chop off the lib at the front, too, if present
+ STRING (REGEX REPLACE "^lib" "" boostPythonLib ${boostPythonLib})
+ MESSAGE (STATUS
+ "PlayerC++ client library will be built with Boost::Thread support.")
+ ELSE (Boost_PYTHON_FOUND)
+ MESSAGE (STATUS
+ "Boost::Python library was not found. Cannot build Python bindings for Hokuyo_aist.")
+ ENDIF (Boost_PYTHON_FOUND)
+ ELSE (Boost_FOUND)
+ MESSAGE (STATUS
+ "Boost libraries were not found. Cannot build Python bindings for Hokuyo_aist.")
+ ENDIF (Boost_FOUND)
+ELSE (CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6)
+ FIND_PACKAGE (Boost)
+ IF (Boost_FOUND)
+ # For 2.4, assume that if boost is found then boost::python is present
+ OPTION (Boost_USE_MULTITHREAD "Use the multithreaded versions of the Boost libraries" ON)
+ MARK_AS_ADVANCED (Boost_USE_MULTITHREAD)
+ IF (Boost_USE_MULTITHREAD)
+ SET (BOOST_LIB_SUFFIX "-mt" CACHE STRING "Boost library name suffix")
+ ELSE (Boost_USE_MULTITHREAD)
+ SET (BOOST_LIB_SUFFIX "" CACHE STRING "Boost library name suffix")
+ ENDIF (Boost_USE_MULTITHREAD)
+ MARK_AS_ADVANCED (BOOST_LIB_SUFFIX)
+
+ SET (boostPythonLib boost_python${BOOST_LIB_SUFFIX})
+ INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS})
+ LINK_DIRECTORIES (${Boost_LIBRARY_DIRS})
+ ELSE (Boost_FOUND)
+ MESSAGE (STATUS
+ "Boost libraries were not found. Cannot build Python bindings for Hokuyo_aist.")
+ ENDIF (Boost_FOUND)
+ENDIF (CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 6)
+
+IF (PYTHON_LIBRARIES AND Boost_FOUND)
+ MESSAGE (STATUS "Hokuyo_aist Python bindings will be built.")
+ SET (srcs hokuyo_aist.cpp)
+
+ SET (pyModuleTarget hokuyo_aist_py)
+ INCLUDE_DIRECTORIES (${PROJECT_SOURCE_DIR}/src/hokuyo_aist ${PYTHON_INCLUDE_PATH})
+ ADD_LIBRARY (${pyModuleTarget} MODULE ${srcs})
+ TARGET_LINK_LIBRARIES (${pyModuleTarget} hokuyo_aist ${boostPythonLib} ${PYTHON_LIBRARIES})
+ SET_TARGET_PROPERTIES (${pyModuleTarget} PROPERTIES PREFIX "" OUTPUT_NAME "hokuyo_aist")
+ INSTALL (TARGETS ${pyModuleTarget} LIBRARY DESTINATION lib/python/site-packages)
+
+ ADD_SUBDIRECTORY (test)
+ENDIF (PYTHON_LIBRARIES AND Boost_FOUND)
\ No newline at end of file
Added: gearbox/trunk/src/hokuyo_aist/python/hokuyo_aist.cpp
===================================================================
--- gearbox/trunk/src/hokuyo_aist/python/hokuyo_aist.cpp (rev 0)
+++ gearbox/trunk/src/hokuyo_aist/python/hokuyo_aist.cpp 2008-08-08 02:51:04 UTC (rev 301)
@@ -0,0 +1,162 @@
+#include <hokuyo_aist.h>
+using namespace hokuyo_aist;
+
+#include <boost/python.hpp>
+#include <boost/python/def.hpp>
+
+#include <iostream>
+
+class HokuyoErrorWrap : public HokuyoError, public boost::python::wrapper<HokuyoError>
+{
+ public:
+ HokuyoErrorWrap (unsigned int code, std::string desc)
+ : HokuyoError (code, desc)
+ {}
+
+ unsigned int Code (void) const throw ()
+ {
+ if (boost::python::override f = get_override ("Code"))
+ return f ();
+ return HokuyoError::Code ();
+ }
+ unsigned int DefaultCode (void) const throw ()
+ { return HokuyoError::Code (); }
+
+ const char* what (void) const throw ()
+ {
+ if (boost::python::override f = get_override ("what"))
+ return f ();
+ return HokuyoError::what ();
+ }
+ const char* Defaultwhat (void) const throw ()
+ { return HokuyoError::what (); }
+
+ std::string AsString (void) const throw ()
+ {
+ if (boost::python::override f = get_override ("AsString"))
+ return f ();
+ return HokuyoError::AsString ();
+ }
+ std::string DefaultAsString (void) const throw ()
+ { return HokuyoError::AsString (); }
+};
+
+class HokuyoDataWrap : public HokuyoData, public boost::python::wrapper<HokuyoData>
+{
+ public:
+ HokuyoDataWrap (void)
+ : HokuyoData ()
+ {}
+ HokuyoDataWrap (uint32_t *ranges, unsigned int length, bool error, unsigned int time)
+ : HokuyoData (ranges, length, error, time)
+ {}
+ HokuyoDataWrap (uint32_t *ranges, uint32_t *intensities, unsigned int length, bool error,
+ unsigned int time)
+ : HokuyoData (ranges, intensities, length, error, time)
+ {}
+
+ uint32_t Range (unsigned int index)
+ { return _ranges[index]; }
+ uint32_t Intensity (unsigned int index)
+ { return _intensities[index]; }
+};
+
+BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (HokuyoLaserOverloads1, GetRanges, 1, 4)
+BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (HokuyoLaserOverloads2, GetRangesByAngle, 3, 4)
+BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (HokuyoLaserOverloads3, GetNewRanges, 1, 4)
+BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (HokuyoLaserOverloads4, GetNewRangesByAngle, 3, 4)
+BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (HokuyoLaserOverloads5, GetNewRangesAndIntensities, 1, 4)
+BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS (HokuyoLaserOverloads6, GetNewRangesAndIntensitiesByAngle, 3, 4)
+
+BOOST_PYTHON_MODULE (hokuyo_aist)
+{
+ using namespace boost::python;
+
+ class_<HokuyoErrorWrap, boost::noncopyable> ("HokuyoError", init<unsigned int, std::string> ())
+ .def ("Code", &HokuyoError::Code, &HokuyoErrorWrap::DefaultCode)
+ .def ("what", &HokuyoError::what, &HokuyoErrorWrap::Defaultwhat)
+ .def ("AsString", &HokuyoError::AsString, &HokuyoErrorWrap::DefaultAsString)
+ ;
+
+ scope ().attr ("HOKUYO_ERR_READ") = HOKUYO_ERR_READ;
+ scope ().attr ("HOKUYO_ERR_WRITE") = HOKUYO_ERR_WRITE;
+ scope ().attr ("HOKUYO_ERR_PROTOCOL") = HOKUYO_ERR_PROTOCOL;
+ scope ().attr ("HOKUYO_ERR_CHANGEBAUD") = HOKUYO_ERR_CHANGEBAUD;
+ scope ().attr ("HOKUYO_ERR_CONNECT_FAILED") = HOKUYO_ERR_CONNECT_FAILED;
+ scope ().attr ("HOKUYO_ERR_CLOSE_FAILED") = HOKUYO_ERR_CLOSE_FAILED;
+ scope ().attr ("HOKUYO_ERR_NODESTINATION") = HOKUYO_ERR_NODESTINATION;
+ scope ().attr ("HOKUYO_ERR_BADFIRMWARE") = HOKUYO_ERR_BADFIRMWARE;
+ scope ().attr ("HOKUYO_ERR_SCIPVERSION") = HOKUYO_ERR_SCIPVERSION;
+ scope ().attr ("HOKUYO_ERR_MEMORY") = HOKUYO_ERR_MEMORY;
+ scope ().attr ("HOKUYO_ERR_UNSUPPORTED") = HOKUYO_ERR_UNSUPPORTED;
+ scope ().attr ("HOKUYO_ERR_BADARG") = HOKUYO_ERR_BADARG;
+ scope ().attr ("HOKUYO_ERR_NODATA") = HOKUYO_ERR_NODATA;
+ scope ().attr ("HOKUYO_ERR_NOTSERIAL") = HOKUYO_ERR_NOTSERIAL;
+
+ // TODO: this causes an undefined symbol error when importing into Python
+// class_<HokuyoSensorInfo> ("HokuyoSensorInfo")
+// .def ("AsString", &HokuyoSensorInfo::AsString)
+// .def_readonly ("vendor", &HokuyoSensorInfo::vendor)
+// .def_readonly ("product", &HokuyoSensorInfo::product)
+// .def_readonly ("firmware", &HokuyoSensorInfo::firmware)
+// .def_readonly ("protocol", &HokuyoSensorInfo::protocol)
+// .def_readonly ("serial", &HokuyoSensorInfo::serial)
+// .def_readonly ("model", &HokuyoSensorInfo::model)
+// .def_readonly ("minRange", &HokuyoSensorInfo::minRange)
+// .def_readonly ("maxRange", &HokuyoSensorInfo::maxRange)
+// .def_readonly ("steps", &HokuyoSensorInfo::steps)
+// .def_readonly ("firstStep", &HokuyoSensorInfo::firstStep)
+// .def_readonly ("lastStep", &HokuyoSensorInfo::lastStep)
+// .def_readonly ("frontStep", &HokuyoSensorInfo::frontStep)
+// .def_readonly ("standardSpeed", &HokuyoSensorInfo::standardSpeed)
+// .def_readonly ("power", &HokuyoSensorInfo::power)
+// .def_readonly ("speed", &HokuyoSensorInfo::speed)
+// .def_readonly ("speedLevel", &HokuyoSensorInfo::speedLevel)
+// .def_readonly ("measureState", &HokuyoSensorInfo::measureState)
+// .def_readonly ("baud", &HokuyoSensorInfo::baud)
+// .def_readonly ("time", &HokuyoSensorInfo::time)
+// .def_readonly ("sensorDiagnostic", &HokuyoSensorInfo::sensorDiagnostic)
+// .def_readonly ("minAngle", &HokuyoSensorInfo::minAngle)
+// .def_readonly ("maxAngle", &HokuyoSensorInfo::maxAngle)
+// .def_readonly ("resolution", &HokuyoSensorInfo::resolution)
+// .def_readonly ("scanableSteps", &HokuyoSensorInfo::scanableSteps)
+// ;
+
+ class_ <HokuyoDataWrap, boost::noncopyable> ("HokuyoData")
+ .def (init<uint32_t*, unsigned int, bool, unsigned int> ())
+ .def (init<uint32_t*, uint32_t*, unsigned int, bool, unsigned int> ())
+ // TODO: write a wrapper function to copy the data into a python array, because this doesn't work
+// .def ("Ranges", &HokuyoData::Ranges, return_value_policy<reference_existing_object> (), with_custodian_and_ward_postcall<1, 0> ())
+ .def ("Range", &HokuyoDataWrap::Range)
+ .def ("Intensity", &HokuyoDataWrap::Intensity)
+ .def ("Length", &HokuyoData::Length)
+ .def ("GetErrorStatus", &HokuyoData::GetErrorStatus)
+ .def ("ErrorCodeToString", &HokuyoData::ErrorCodeToString)
+ .def ("TimeStamp", &HokuyoData::TimeStamp)
+ .def ("AsString", &HokuyoData::AsString)
+ .def ("CleanUp", &HokuyoData::CleanUp)
+ ;
+
+ class_ <HokuyoLaser> ("HokuyoLaser")
+ .def ("Open", &HokuyoLaser::Open)
+ .def ("Close", &HokuyoLaser::Close)
+ .def ("IsOpen", &HokuyoLaser::IsOpen)
+ .def ("SetPower", &HokuyoLaser::SetPower)
+ .def ("SetBaud", &HokuyoLaser::SetBaud)
+ .def ("Reset", &HokuyoLaser::Reset)
+ .def ("SetMotorSpeed", &HokuyoLaser::SetMotorSpeed)
+ .def ("SetHighSensitivity", &HokuyoLaser::SetHighSensitivity)
+ .def ("GetSensorInfo", &HokuyoLaser::GetSensorInfo)
+ .def ("GetTime", &HokuyoLaser::GetTime)
+ .def ("GetRanges", &HokuyoLaser::GetRanges, HokuyoLaserOverloads1 ())
+ .def ("GetRangesByAngle", &HokuyoLaser::GetRangesByAngle, HokuyoLaserOverloads2 ())
+ .def ("GetNewRanges", &HokuyoLaser::GetNewRanges, HokuyoLaserOverloads3 ())
+ .def ("GetNewRangesByAngle", &HokuyoLaser::GetNewRangesByAngle, HokuyoLaserOverloads4 ())
+ .def ("GetNewRangesAndIntensities", &HokuyoLaser::GetNewRangesAndIntensities, HokuyoLaserOverloads5 ())
+ .def ("GetNewRangesAndIntensitiesByAngle", &HokuyoLaser::GetNewRangesAndIntensitiesByAngle, HokuyoLaserOverloads6 ())
+ .def ("SCIPVersion", &HokuyoLaser::SCIPVersion)
+ .def ("SetVerbose", &HokuyoLaser::SetVerbose)
+ .def ("StepToAngle", &HokuyoLaser::StepToAngle)
+ .def ("AngleToStep", &HokuyoLaser::AngleToStep)
+ ;
+}
Added: gearbox/trunk/src/hokuyo_aist/python/test/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/hokuyo_aist/python/test/CMakeLists.txt (rev 0)
+++ gearbox/trunk/src/hokuyo_aist/python/test/CMakeLists.txt 2008-08-08 02:51:04 UTC (rev 301)
@@ -0,0 +1 @@
+INSTALL (FILES hokuyo_aist_example.py DESTINATION share/${PROJECT_NAME}/hokuyo_aist/example)
Added: gearbox/trunk/src/hokuyo_aist/python/test/hokuyo_aist_example.py
===================================================================
--- gearbox/trunk/src/hokuyo_aist/python/test/hokuyo_aist_example.py (rev 0)
+++ gearbox/trunk/src/hokuyo_aist/python/test/hokuyo_aist_example.py 2008-08-08 02:51:04 UTC (rev 301)
@@ -0,0 +1,91 @@
+#!/usr/bin/env python
+
+import hokuyo_aist
+from optparse import OptionParser
+
+def main ():
+ parser = OptionParser ()
+ parser.add_option ('-b', '--baud', dest = 'baudRate', type = 'int', default = '19200',
+ help = 'Baud rate to set the laser to *after* connecting [default: %default]')
+ parser.add_option ('-c', '--clustercount', dest = 'clusterCount', type = 'int', default = '1',
+ help = 'Cluster count [default: %default]')
+ parser.add_option ('-e', '--endangle', dest = 'endAngle', type = 'float', default = '0',
+ help = 'End angle to get ranges to [default: %default]')
+ parser.add_option ('-f', '--firststep', dest = 'firstStep', type = 'int', default = '-1',
+ help = 'First step to get ranges from [default: %default]')
+ parser.add_option ('-l', '--laststep', dest = 'lastStep', type = 'int', default = '-1',
+ help = 'Last step to get ranges to [default: %default]')
+ parser.add_option ('-m', '--motorspeed', dest = 'motorSpeed', type = 'int', default = '0',
+ help = 'Motor speed stepping (higher is slower) [default: %default]')
+ parser.add_option ('-n', '--new', dest = 'getNew', action = 'store_true', default = 'False',
+ help = 'Get new ranges instead of latest ranges [default: %default]')
+ parser.add_option ('-o', '--portoptions', dest = 'portOptions', type = 'string', default = 'type=serial,device=/dev/ttyACM0,timeout=1',
+ help = 'Port options (see flexiport library) [default: %default]')
+ parser.add_option ('-s', '--startangle', dest = 'startAngle', type = 'float', default = '0',
+ help = 'Start angle to get ranges from [default: %default]')
+ parser.add_option ('-v', '--verbose', dest = 'verbose', action = 'store_true', default = 'False',
+ help = 'Put the hokuyo_aist library into verbose mode [default: %default]')
+
+ # Scan command line arguments
+ options, args = parser.parse_args ()
+
+ try:
+ # Create an instance of a laser scanner object
+ laser = hokuyo_aist.HokuyoLaser ()
+ if options.verbose == True:
+ # Set verbose mode so we see more information in stderr
+ laser.SetVerbose (True)
+
+ # Open the laser
+ laser.Open (options.portOptions)
+ # Turn the laser on
+ laser.SetPower (True)
+ # Set the baud rate
+ try:
+ laser.SetBaud (options.baudRate)
+ except hokuyo_aist.HokuyoError, e:
+ print 'Failed to change baud rate: (' + str (e.Code ()) + ') ' + e.what ()
+ # Set the motor speed
+ laser.SetMotorSpeed (options.motorSpeed)
+
+ # Get some laser info
+ #print 'Laser sensor information:'
+ #info = hokuyo_aist.HokuyoSensorInfo info ()
+ #laser.GetSensorInfo (info)
+ #print info.AsString ()
+
+ # Get range data
+ data = hokuyo_aist.HokuyoData ()
+ if (options.firstStep == -1 and options.lastStep == -1) and \
+ (options.startAngle == 0 and options.endAngle == 0):
+ # Get all ranges
+ if options.getNew == True:
+ laser.GetNewRanges (data, -1, -1, options.clusterCount)
+ else:
+ laser.GetRanges (data, -1, -1, options.clusterCount)
+ elif options.firstStep != -1 or options.lastStep != -1:
+ # Get by step
+ if options.getNew == True:
+ laser.GetNewRanges (data, options.firstStep, options.lastStep, options.clusterCount)
+ else:
+ laser.GetRanges (data, options.firstStep, options.lastStep, options.clusterCount)
+ else:
+ # Get by angle
+ if options.getNew == True:
+ laser.GetNewRangesByAngle (data, options.startAngle, options.endAngle, options.clusterCount)
+ else:
+ laser.GetRangesByAngle (data, options.startAngle, options.endAngle, options.clusterCount)
+
+ print 'Laser range data:'
+ print data.AsString ()
+
+ # Close the laser
+ laser.Close ()
+
+ except hokuyo_aist.HokuyoError, e:
+ print 'Caught exception: (' + str (e.Code ()) + ') ' + e.what ()
+ sys.exit (1)
+
+
+if __name__ == '__main__':
+ main ()
Property changes on: gearbox/trunk/src/hokuyo_aist/python/test/hokuyo_aist_example.py
___________________________________________________________________
Added: svn:executable
+ *
Modified: gearbox/trunk/src/hokuyo_aist/test/example.cpp
===================================================================
--- gearbox/trunk/src/hokuyo_aist/test/example.cpp 2008-08-06 00:37:42 UTC (rev 300)
+++ gearbox/trunk/src/hokuyo_aist/test/example.cpp 2008-08-08 02:51:04 UTC (rev 301)
@@ -137,7 +137,7 @@
else
laser.GetRanges (&data, -1, -1, clusterCount);
}
- else if (firstStep != -1 && lastStep != -1)
+ else if (firstStep != -1 || lastStep != -1)
{
// Get by step
if (getNew)
@@ -149,9 +149,9 @@
{
// Get by angle
if (getNew)
- laser.GetNewRanges (&data, startAngle, endAngle, clusterCount);
+ laser.GetNewRangesByAngle (&data, startAngle, endAngle, clusterCount);
else
- laser.GetRanges (&data, startAngle, endAngle, clusterCount);
+ laser.GetRangesByAngle (&data, startAngle, endAngle, clusterCount);
}
cout << "Laser range data:" << endl;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2008-08-06 00:37:32
|
Revision: 300
http://gearbox.svn.sourceforge.net/gearbox/?rev=300&view=rev
Author: gbiggs
Date: 2008-08-06 00:37:42 +0000 (Wed, 06 Aug 2008)
Log Message:
-----------
Removed unnecessary includes
Modified Paths:
--------------
gearbox/trunk/src/flexiport/timeout.h
Modified: gearbox/trunk/src/flexiport/timeout.h
===================================================================
--- gearbox/trunk/src/flexiport/timeout.h 2008-07-29 09:29:25 UTC (rev 299)
+++ gearbox/trunk/src/flexiport/timeout.h 2008-08-06 00:37:42 UTC (rev 300)
@@ -4,17 +4,17 @@
* Copyright (c) 2008 Geoffrey Biggs
*
* flexiport flexible hardware data communications library.
- *
- * This distribution is licensed to you under the terms described in the LICENSE file included in
+ *
+ * This distribution is licensed to you under the terms described in the LICENSE file included in
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
* Japan. Registration number: H20PRO-881
- *
+ *
* This file is part of flexiport.
*
* flexiport 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 3 of
+ * Lesser General Public License as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* flexiport is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
@@ -28,9 +28,6 @@
#ifndef __TIMEOUT_H
#define __TIMEOUT_H
-#include <map>
-#include <string>
-
#if defined (WIN32)
#if defined (FLEXIPORT_EXPORTS)
#define FLEXIPORT_EXPORT __declspec (dllexport)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2008-07-29 09:29:21
|
Revision: 299
http://gearbox.svn.sourceforge.net/gearbox/?rev=299&view=rev
Author: gbiggs
Date: 2008-07-29 09:29:25 +0000 (Tue, 29 Jul 2008)
Log Message:
-----------
Removed unnecessary NULL checks (yay, std::bad_alloc!)
Modified Paths:
--------------
gearbox/trunk/src/flexiport/flexiport.cpp
gearbox/trunk/src/flexiport/logfile.cpp
gearbox/trunk/src/flexiport/logreaderport.cpp
gearbox/trunk/src/flexiport/logwriterport.cpp
gearbox/trunk/src/flexiport/port.cpp
gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
Modified: gearbox/trunk/src/flexiport/flexiport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/flexiport.cpp 2008-07-25 13:09:43 UTC (rev 298)
+++ gearbox/trunk/src/flexiport/flexiport.cpp 2008-07-29 09:29:25 UTC (rev 299)
@@ -4,17 +4,17 @@
* Copyright (c) 2008 Geoffrey Biggs
*
* flexiport flexible hardware data communications library.
- *
- * This distribution is licensed to you under the terms described in the LICENSE file included in
+ *
+ * This distribution is licensed to you under the terms described in the LICENSE file included in
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
* Japan. Registration number: H20PRO-881
- *
+ *
* This file is part of flexiport.
*
* flexiport 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 3 of
+ * Lesser General Public License as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* flexiport is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
@@ -103,49 +103,28 @@
#ifdef FLEXIPORT_INCLUDE_SERIAL
if (type == "serial")
- {
- SerialPort *newPort = new SerialPort (options);
- if (newPort == NULL)
- throw PortException ("Failed to allocate new port");
- return newPort;
- }
+ return new SerialPort (options);
#endif // FLEXIPORT_INCLUDE_SERIAL
#ifdef FLEXIPORT_INCLUDE_TCP
if (type == "tcp")
- {
- TCPPort *newPort = new TCPPort (options);
- if (newPort == NULL)
- throw PortException ("Failed to allocate new port");
- return newPort;
- }
+ return new TCPPort (options);
#endif // FLEXIPORT_INCLUDE_TCP
#ifdef FLEXIPORT_INCLUDE_LOGGING
if (type == "logreader")
- {
- LogReaderPort *newPort = new LogReaderPort (options);
- if (newPort == NULL)
- throw PortException ("Failed to allocate new port");
- return newPort;
- }
+ return new LogReaderPort (options);
#ifdef FLEXIPORT_INCLUDE_SERIAL
if (type == "seriallog")
{
options["type"] = "serial";
- LogWriterPort *newPort = new LogWriterPort (options);
- if (newPort == NULL)
- throw PortException ("Failed to allocate new port");
- return newPort;
+ return new LogWriterPort (options);
}
#endif // FLEXIPORT_INCLUDE_SERIAL
#ifdef FLEXIPORT_INCLUDE_TCP
if (type == "tcplog")
{
options["type"] = "tcp";
- LogWriterPort *newPort = new LogWriterPort (options);
- if (newPort == NULL)
- throw PortException ("Failed to allocate new port");
- return newPort;
+ return new LogWriterPort (options);
}
#endif // FLEXIPORT_INCLUDE_TCP
#endif // FLEXIPORT_INCLUDE_LOGGING
Modified: gearbox/trunk/src/flexiport/logfile.cpp
===================================================================
--- gearbox/trunk/src/flexiport/logfile.cpp 2008-07-25 13:09:43 UTC (rev 298)
+++ gearbox/trunk/src/flexiport/logfile.cpp 2008-07-29 09:29:25 UTC (rev 299)
@@ -633,11 +633,7 @@
// Allocate space to store the data to compare with
uint8_t *fileData;
- if ((fileData = new uint8_t[count]) == NULL)
- {
- throw PortException (string ("LogFile::") + __func__ +
- string ("Failed to allocate temporary space for write comparison."));
- }
+ fileData = new uint8_t[count];
// Pull any data out of the overflow first
bool needMore = true;
Modified: gearbox/trunk/src/flexiport/logreaderport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/logreaderport.cpp 2008-07-25 13:09:43 UTC (rev 298)
+++ gearbox/trunk/src/flexiport/logreaderport.cpp 2008-07-29 09:29:25 UTC (rev 299)
@@ -52,11 +52,7 @@
ProcessOptions (options);
// Initialise the log file
- if ((_logFile = new LogFile (_debug)) == NULL)
- {
- throw PortException (string ("LogReaderPort::") + __func__ +
- string ("() Failed to allocate LogFile object."));
- }
+ _logFile = new LogFile (_debug);
_logFile->Open (_logFileName, true, _ignoreTimes);
if (_alwaysOpen)
Modified: gearbox/trunk/src/flexiport/logwriterport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/logwriterport.cpp 2008-07-25 13:09:43 UTC (rev 298)
+++ gearbox/trunk/src/flexiport/logwriterport.cpp 2008-07-29 09:29:25 UTC (rev 299)
@@ -71,11 +71,7 @@
_port = CreatePort (options);
// Initialise the log file
- if ((_logFile = new LogFile (_debug)) == NULL)
- {
- throw PortException (string ("LogWriterPort::") + __func__ +
- string ("() Failed to allocate LogFile object."));
- }
+ _logFile = new LogFile (_debug);
_logFile->Open (_logFileName, false);
}
Modified: gearbox/trunk/src/flexiport/port.cpp
===================================================================
--- gearbox/trunk/src/flexiport/port.cpp 2008-07-25 13:09:43 UTC (rev 298)
+++ gearbox/trunk/src/flexiport/port.cpp 2008-07-29 09:29:25 UTC (rev 299)
@@ -4,17 +4,17 @@
* Copyright (c) 2008 Geoffrey Biggs
*
* flexiport flexible hardware data communications library.
- *
- * This distribution is licensed to you under the terms described in the LICENSE file included in
+ *
+ * This distribution is licensed to you under the terms described in the LICENSE file included in
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
* Japan. Registration number: H20PRO-881
- *
+ *
* This file is part of flexiport.
*
* flexiport 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 3 of
+ * Lesser General Public License as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* flexiport is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
@@ -73,7 +73,7 @@
{
char *charBuffer = NULL;
ssize_t bytesAvailable = 0, numRead = 0;
-
+
buffer.clear ();
CheckPort (true);
@@ -86,17 +86,13 @@
if (_debug >= 2)
{
- cerr << "Port::" << __func__ << "() Got " << bytesAvailable <<
+ cerr << "Port::" << __func__ << "() Got " << bytesAvailable <<
" bytes waiting to be read into a string" << endl;
}
// Read this many characters into a string - include space for a NULL incase one doesn't
// come in the transmitted data.
- if ((charBuffer = new char[bytesAvailable + 1]) == NULL)
- {
- throw PortException (string ("Port::") + __func__ +
- string ("() Failed to allocate temporary string storage."));
- }
+ charBuffer = new char[bytesAvailable + 1];
if ((numRead = Read (charBuffer, bytesAvailable)) < 0)
return -1; // Timeout
charBuffer[numRead] = '\0';
@@ -104,8 +100,8 @@
if (numRead != bytesAvailable && _debug >= 1)
{
- cerr << "WARNING: Port::" << __func__ <<
- " Read different number of bytes than peek said were available: " <<
+ cerr << "WARNING: Port::" << __func__ <<
+ " Read different number of bytes than peek said were available: " <<
numRead << " != " << bytesAvailable << endl;
}
if (_debug >= 2)
@@ -125,7 +121,7 @@
if (_debug >= 2)
{
- cerr << "Port::" << __func__ << "() Reading until '" << terminator << "' or " <<
+ cerr << "Port::" << __func__ << "() Reading until '" << terminator << "' or " <<
count << " bytes." << endl;
}
// Read bytes one at a time until either a timeout occurs, we hit the terminator byte, or
@@ -170,7 +166,7 @@
if (_debug >= 2)
{
- cerr << "Port::" << __func__ << "() Reading string until receive '" << terminator <<
+ cerr << "Port::" << __func__ << "() Reading string until receive '" << terminator <<
"'" << endl;
}
// Read bytes one at a time until either a timeout occurs or we hit the terminator byte
@@ -256,7 +252,7 @@
if (_debug >= 2)
{
- cerr << "Port::" << __func__ << "() Skipping until '" << terminator << "' is seen " <<
+ cerr << "Port::" << __func__ << "() Skipping until '" << terminator << "' is seen " <<
count << " times." << endl;
}
// Read bytes one at a time until either a timeout occurs or we hit the terminator byte
@@ -309,15 +305,15 @@
if (!IsOpen ())
{
stringstream ss;
- ss << "Port::" << __func__ << "() Port closed while trying to write " <<
+ ss << "Port::" << __func__ << "() Port closed while trying to write " <<
count << " bytes";
throw PortException (ss.str ());
}
// If it is open we can keep going, but with a warning
if (_debug >= 1)
{
- cerr << "WARNING: Port::" << __func__ <<
- " Port closed during WriteFull operation; data may be missing/corrupted." <<
+ cerr << "WARNING: Port::" << __func__ <<
+ " Port closed during WriteFull operation; data may be missing/corrupted." <<
endl;
}
}
@@ -342,7 +338,7 @@
return -1; // Timeout
if (numWritten < numToWrite && _debug >= 1)
{
- cerr << "WARNING: Port::" << __func__ << "() Did not write whole string; only wrote " <<
+ cerr << "WARNING: Port::" << __func__ << "() Did not write whole string; only wrote " <<
numWritten << " of " << numToWrite << " bytes" << endl;
}
Modified: gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
===================================================================
--- gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2008-07-25 13:09:43 UTC (rev 298)
+++ gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2008-07-29 09:29:25 UTC (rev 299)
@@ -566,10 +566,14 @@
}
else
{
- if ((_ranges = new uint32_t[_length]) == NULL)
+ try
{
+ _ranges = new uint32_t[_length];
+ }
+ catch (std::bad_alloc &e)
+ {
_length = 0;
- throw HokuyoError (HOKUYO_ERR_MEMORY, "Failed to allocate space to copy range data.");
+ throw;
}
memcpy (_ranges, ranges, sizeof (uint32_t) * _length);
@@ -589,18 +593,18 @@
}
else
{
- if ((_ranges = new uint32_t[_length]) == NULL)
+ try
{
+ _ranges = new uint32_t[_length];
+ }
+ catch (std::bad_alloc &e)
+ {
_length = 0;
- throw HokuyoError (HOKUYO_ERR_MEMORY, "Failed to allocate space to copy range data.");
+ throw;
}
memcpy (_ranges, ranges, sizeof (uint32_t) * _length);
- if ((_intensities = new uint32_t[_length]) == NULL)
- {
- throw HokuyoError (HOKUYO_ERR_MEMORY,
- "Failed to allocate space to copy intensity data.");
- }
+ _intensities = new uint32_t[_length];
memcpy (_intensities, intensities, sizeof (uint32_t) * _length);
}
}
@@ -612,20 +616,20 @@
_ranges = NULL;
else
{
- if ((_ranges = new uint32_t[_length]) == NULL)
+ try
{
+ _ranges = new uint32_t[_length];
+ }
+ catch (std::bad_alloc &e)
+ {
_length = 0;
- throw HokuyoError (HOKUYO_ERR_MEMORY, "Failed to allocate space to copy data.");
+ throw;
}
memcpy (_ranges, rhs.Ranges (), sizeof (uint32_t) * _length);
if (rhs.Intensities () != NULL)
{
- if ((_intensities = new uint32_t[_length]) == NULL)
- {
- throw HokuyoError (HOKUYO_ERR_MEMORY,
- "Failed to allocate space to copy intensity data.");
- }
+ _intensities = new uint32_t[_length];
memcpy (_intensities, rhs.Intensities (), sizeof (uint32_t) * _length);
}
}
@@ -739,11 +743,7 @@
{
// Copy the data into a temporary variable pointing to new space (prevents dangling
// pointers on allocation error and prevents self-assignment making a mess).
- if ((newData = new uint32_t[rhsLength]) == NULL)
- {
- throw HokuyoError (HOKUYO_ERR_MEMORY,
- "Failed to allocate space to copy range data.");
- }
+ newData = new uint32_t[rhsLength];
memcpy (newData, rhs.Ranges (), sizeof (uint32_t) * rhsLength);
if (_ranges != NULL)
delete[] _ranges;
@@ -752,14 +752,17 @@
if (rhs.Intensities () != NULL)
{
- if ((newData = new uint32_t[rhsLength]) == NULL)
+ try
{
+ newData = new uint32_t[rhsLength];
+ }
+ catch (std::bad_alloc &e)
+ {
// We have to remove any old intensity data or the length won't match
if (_intensities != NULL)
delete[] _intensities;
_intensities = NULL;
- throw HokuyoError (HOKUYO_ERR_MEMORY,
- "Failed to allocate space to copy intensity data.");
+ throw;
}
memcpy (newData, rhs.Intensities (), sizeof (uint32_t) * rhsLength);
if (_intensities != NULL)
@@ -837,10 +840,14 @@
// If no data yet, allocate new
if (_ranges == NULL)
{
- if ((_ranges = new uint32_t[length]) == NULL)
+ try
{
+ _ranges = new uint32_t[length];
+ }
+ catch (std::bad_alloc &e)
+ {
_length = 0;
- throw HokuyoError (HOKUYO_ERR_MEMORY, "Failed to allocate space for range data.");
+ throw;
}
_length = length;
}
@@ -848,10 +855,14 @@
else if (length != _length)
{
delete[] _ranges;
- if ((_ranges = new uint32_t[length]) == NULL)
+ try
{
+ _ranges = new uint32_t[length];
+ }
+ catch (std::bad_alloc &e)
+ {
_length = 0;
- throw HokuyoError (HOKUYO_ERR_MEMORY, "Failed to allocate space for range data.");
+ throw;
}
_length = length;
}
@@ -862,21 +873,13 @@
// If no data yet, allocate new
if (_intensities == NULL)
{
- if ((_intensities = new uint32_t[length]) == NULL)
- {
- throw HokuyoError (HOKUYO_ERR_MEMORY,
- "Failed to allocate space for intensity data.");
- }
+ _intensities = new uint32_t[length];
}
// If there is data, reallocate only if the length is different
else if (length != _length)
{
delete[] _intensities;
- if ((_intensities = new uint32_t[length]) == NULL)
- {
- throw HokuyoError (HOKUYO_ERR_MEMORY,
- "Failed to allocate space for intensity data.");
- }
+ _intensities = new uint32_t[length];
}
// Else data is already allocated to the right length, so do nothing
}
@@ -1497,7 +1500,7 @@
// Mx commands will perform a scan, then send the data prefixed with another command echo
// Read back the command echo (minimum of 3 bytes, maximum of 16 bytes)
char response[17];
- SkipLines (1); // End of the command echo message
+ SkipLines (1); // End of the command echo message
ReadLine (response, 16); // Size is command (2) + params (13) + new line (1)
// Check the echo is correct
if (response[0] != 'M' || response[1] != 'D')
@@ -1618,7 +1621,7 @@
// Mx commands will perform a scan, then send the data prefixed with another command echo
// Read back the command echo (minimum of 3 bytes, maximum of 16 bytes)
char response[17];
- SkipLines (1); // End of the command echo message
+ SkipLines (1); // End of the command echo message
ReadLine (response, 16); // Size is command (2) + params (13) + new line (1)
// Check the echo is correct
if (response[0] != 'M' || response[1] != 'E')
@@ -2038,8 +2041,8 @@
void HokuyoLaser::GetAndSetSCIPVersion (void)
{
bool scip1Failed = false;
-
+
if (_verbose)
cerr << "HokuyoLaser::" << __func__ << "() Testing SCIP protocol version." << endl;
// Try SCIP version 1 first by sending an info command
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-07-25 13:09:34
|
Revision: 298
http://gearbox.svn.sourceforge.net/gearbox/?rev=298&view=rev
Author: russo2503v
Date: 2008-07-25 13:09:43 +0000 (Fri, 25 Jul 2008)
Log Message:
-----------
version++
Modified Paths:
--------------
gearbox/trunk/CMakeLists.txt
gearbox/trunk/doc/release_instructions.dox
Modified: gearbox/trunk/CMakeLists.txt
===================================================================
--- gearbox/trunk/CMakeLists.txt 2008-07-25 12:37:28 UTC (rev 297)
+++ gearbox/trunk/CMakeLists.txt 2008-07-25 13:09:43 UTC (rev 298)
@@ -11,7 +11,7 @@
#
# project version string
#
-SET( GBX_PROJECT_VERSION 8.07 CACHE STRING "Version of GearBox distribution" )
+SET( GBX_PROJECT_VERSION 8.07+ CACHE STRING "Version of GearBox distribution" )
#
# The rest is done by a script
Modified: gearbox/trunk/doc/release_instructions.dox
===================================================================
--- gearbox/trunk/doc/release_instructions.dox 2008-07-25 12:37:28 UTC (rev 297)
+++ gearbox/trunk/doc/release_instructions.dox 2008-07-25 13:09:43 UTC (rev 298)
@@ -30,21 +30,21 @@
-# Check in those changes.
-# Tag the distributions, eg with:
@verbatim
-$ svn copy https://gearbox.svn.sf.net/svnroot/gearbox/gearbox/trunk https://gearbox.svn.sf.net/svnroot/gearbox/gearbox/tags/RELEASE_1.7.0 -m 'Tagging release 1.7.0'
+$ svn copy https://gearbox.svn.sf.net/svnroot/gearbox/gearbox/trunk https://gearbox.svn.sf.net/svnroot/gearbox/gearbox/tags/RELEASE_9.02 -m 'Tagging release 9.02'
@endverbatim
-# Delete all .svn directories (eg with 'find . -name .svn | xargs rm -rf')
- -# Create tar-ball, named eg. 'gearbox-1.7.0.tar.gz'
+ -# Create tar-ball, named eg. 'gearbox-9.02.tar.gz'
-# Now the tar-ball is ready to roll. But first test that the original untars and builds cleanly.
-# Copy the tar-ball to a machine with external access.
-# On a machine with external access:
- -# ftp to upload.sf.net (anonymous login)
- -# cd /incoming
+ -# sftp [USERNAME]\@frs.sf.net
+ -# cd uploads
-# 'put' the tarball
-# Create a new distro through the sourceforge web interface
- Login a project administrator
- (Go through "'Admin' -> 'File Releases'" from the GearBox project page)
-# Update the web page
- Use the script: <distro>/doc/rebuild_docco.sh
--# Increment the version numbers (eg '1.7.0' -> '1.7.0+') in the top-level CMakeLists.txt files.
+-# Increment the version numbers (eg '9.02' -> '9.02+') in the top-level CMakeLists.txt files.
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-07-25 12:37:18
|
Revision: 297
http://gearbox.svn.sourceforge.net/gearbox/?rev=297&view=rev
Author: russo2503v
Date: 2008-07-25 12:37:28 +0000 (Fri, 25 Jul 2008)
Log Message:
-----------
Tagging release 8.07
Added Paths:
-----------
gearbox/tags/RELEASE_8.07/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-07-25 12:36:27
|
Revision: 296
http://gearbox.svn.sourceforge.net/gearbox/?rev=296&view=rev
Author: russo2503v
Date: 2008-07-25 12:36:35 +0000 (Fri, 25 Jul 2008)
Log Message:
-----------
version++
Modified Paths:
--------------
gearbox/trunk/CMakeLists.txt
gearbox/trunk/doc/history.dox
gearbox/trunk/doc/index.dox
Modified: gearbox/trunk/CMakeLists.txt
===================================================================
--- gearbox/trunk/CMakeLists.txt 2008-07-25 12:35:35 UTC (rev 295)
+++ gearbox/trunk/CMakeLists.txt 2008-07-25 12:36:35 UTC (rev 296)
@@ -11,7 +11,7 @@
#
# project version string
#
-SET( GBX_PROJECT_VERSION 1.0.0+ CACHE STRING "Version of GearBox distribution" )
+SET( GBX_PROJECT_VERSION 8.07 CACHE STRING "Version of GearBox distribution" )
#
# The rest is done by a script
Modified: gearbox/trunk/doc/history.dox
===================================================================
--- gearbox/trunk/doc/history.dox 2008-07-25 12:35:35 UTC (rev 295)
+++ gearbox/trunk/doc/history.dox 2008-07-25 12:36:35 UTC (rev 296)
@@ -21,18 +21,37 @@
Developers: as you make substantial changes in the code (add features, fix bugs, etc.), add an item in the section on changes. When the next version is released, this list will be copied into the release notes.
-@section hydro_doc_todo_todo To-Do List for Next Release
+@section gbx_doc_history_todo To-Do List for Next Release
@section gbx_doc_history_head Changes in SVN since Last Release
+@section gbx_doc_history_807 Changes in Release 8.07
+
@par Project wide
+- Build system
+ - cmake files updated for cmake 2.6
+
+- Compiler
+ - compiles cleanly under gcc43
+
@par New libraries
+- libGbxGarminAcfr
+- libGbxUtilAcfr
+- libGbxNovatelAcfr
+- flexiport
+- libGbxSmartBatteryAcfr
+- hokuyo_aist
+
@par Updated libraries
+- libGbxSickAcfr
+ - using 'size_t' instead of 'uint' to improve compatibility.
+
@par Removed libraries
+- hokuyo_nz
@section gbx_doc_history_100 Changes in Release 1.0.0
Modified: gearbox/trunk/doc/index.dox
===================================================================
--- gearbox/trunk/doc/index.dox 2008-07-25 12:35:35 UTC (rev 295)
+++ gearbox/trunk/doc/index.dox 2008-07-25 12:36:35 UTC (rev 296)
@@ -45,6 +45,7 @@
@section gbx_doc_index_news News
+- 25-Jul-08 Release 8.07. Includes 5 new libraries and a re-write of the Hokuyo driver. (@ref gbx_doc_history_807)
- 21-Apr-08 First release, version 1.0 (@ref gbx_doc_history_100)
- 18-Mar-08 Accepted ACFR's implementation of SICK laser driver and the serial library used by it.
- 08-Feb-08 Accepted the first library: a driver for the URG laser.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-07-25 12:35:26
|
Revision: 295
http://gearbox.svn.sourceforge.net/gearbox/?rev=295&view=rev
Author: russo2503v
Date: 2008-07-25 12:35:35 +0000 (Fri, 25 Jul 2008)
Log Message:
-----------
this file was renamed into history.dox a long time ago and should have been deleted.
Removed Paths:
-------------
gearbox/trunk/doc/todo.dox
Deleted: gearbox/trunk/doc/todo.dox
===================================================================
--- gearbox/trunk/doc/todo.dox 2008-07-25 12:25:47 UTC (rev 294)
+++ gearbox/trunk/doc/todo.dox 2008-07-25 12:35:35 UTC (rev 295)
@@ -1,57 +0,0 @@
-/*
- * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
- * http://gearbox.sf.net/
- * Copyright (c) 2008 GearBox Team
- *
- * This distribution is licensed to you under the terms described in
- * the LICENSE file included in this distribution.
- *
- */
-
-TEMPLATE
-@par Project wide
-@par New libraries
-@par Updated libraries
-@par Removed libraries
-
-/*!
-
-@page gbx_doc_todo Changes since Last Release and To-Do List
-
-Developers: as you make substantial changes in the code (add features, fix bugs, etc.), add an item in the section on changes. When the next version is released, this list will be copied into the release notes.
-
-@section gbx_doc_todo_todo To-Do List for Next Release
-
-@section gbx_doc_history_head Changes in SVN since Last Release
-
-@par Project wide
-
-- Build system
- - cmake files updated for cmake 2.6
-
-- Compiler
- - compiles cleanly under gcc43
-
-@par New libraries
-
-- libGbxGarminAcfr
-- libGbxUtilAcfr
-- libGbxNovatelAcfr
-- flexiport
-- libGbxSmartBatteryAcfr
-- hokuyo_aist
-
-@par Updated libraries
-
-- libGbxSickAcfr
- - using 'size_t' instead of 'uint' to improve compatibility.
-
-@par Removed libraries
-
-@section gbx_doc_history_001 Changes in Release 0.0.1
-
-@par Project wide
-
-- First commit.
-
-*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-07-25 12:25:39
|
Revision: 294
http://gearbox.svn.sourceforge.net/gearbox/?rev=294&view=rev
Author: russo2503v
Date: 2008-07-25 12:25:47 +0000 (Fri, 25 Jul 2008)
Log Message:
-----------
Modified Paths:
--------------
gearbox/trunk/LICENSE
gearbox/trunk/doc/release_instructions.dox
Modified: gearbox/trunk/LICENSE
===================================================================
--- gearbox/trunk/LICENSE 2008-07-22 03:40:52 UTC (rev 293)
+++ gearbox/trunk/LICENSE 2008-07-25 12:25:47 UTC (rev 294)
@@ -10,8 +10,7 @@
src/gbxutilacfr LGPL
src/gbxgarminacfr LGPL
src/gbxsickacfr LGPL
+src/gbxsickacfr/gbxiceutilacfr LGPL
src/gbxsickacfr/gbxserialdeviceacfr LGPL
src/gbxsmartbatteryacfr LGPL
src/hokuyo_aist LGPL
-submitted/gbxnovatelacfr LGPL
-submitted/gbxnovatelacfr/gbxnovatelutilacfr LGPL
Modified: gearbox/trunk/doc/release_instructions.dox
===================================================================
--- gearbox/trunk/doc/release_instructions.dox 2008-07-22 03:40:52 UTC (rev 293)
+++ gearbox/trunk/doc/release_instructions.dox 2008-07-25 12:25:47 UTC (rev 294)
@@ -24,7 +24,7 @@
-# Modify the project version in the top-level CMakeLists.txt file.
-# Modify the 'news' section in the 'index.dox' file.
-# (Possibly) delete retired directory.
- -# Update LICENSE information by running cmake with BUILD_LICENSE=ON.
+ -# Update LICENSE information by running cmake with GBX_BUILD_LICENSE=ON.
-# Shunt everything down in 'doc/history.dox'.
-# Delete any temporary files created by an editor.
-# Check in those changes.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2008-07-22 03:40:44
|
Revision: 293
http://gearbox.svn.sourceforge.net/gearbox/?rev=293&view=rev
Author: gbiggs
Date: 2008-07-22 03:40:52 +0000 (Tue, 22 Jul 2008)
Log Message:
-----------
Fixed hokuyo_aist license entry
Modified Paths:
--------------
gearbox/trunk/LICENSE
gearbox/trunk/src/hokuyo_aist/CMakeLists.txt
Modified: gearbox/trunk/LICENSE
===================================================================
--- gearbox/trunk/LICENSE 2008-07-22 03:27:37 UTC (rev 292)
+++ gearbox/trunk/LICENSE 2008-07-22 03:40:52 UTC (rev 293)
@@ -3,9 +3,15 @@
DIRECTORY license
----------------------------------------------------------------------
src/basicexample LGPL
+src/flexiport LGPL
src/gbxadvancedexample GPL
src/gbxserialacfr LGPL
src/gbxserialacfr/lockfile LGPL
+src/gbxutilacfr LGPL
+src/gbxgarminacfr LGPL
src/gbxsickacfr LGPL
src/gbxsickacfr/gbxserialdeviceacfr LGPL
-src/urg_nz GPL
+src/gbxsmartbatteryacfr LGPL
+src/hokuyo_aist LGPL
+submitted/gbxnovatelacfr LGPL
+submitted/gbxnovatelacfr/gbxnovatelutilacfr LGPL
Modified: gearbox/trunk/src/hokuyo_aist/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/hokuyo_aist/CMakeLists.txt 2008-07-22 03:27:37 UTC (rev 292)
+++ gearbox/trunk/src/hokuyo_aist/CMakeLists.txt 2008-07-22 03:40:52 UTC (rev 293)
@@ -1,6 +1,6 @@
SET (libName hokuyo_aist)
set (libDesc "Hokuyo laser scanner driver")
-GBX_ADD_LICENSE (GPL)
+GBX_ADD_LICENSE (LGPL)
SET (build TRUE)
GBX_REQUIRE_OPTION (build LIB ${libName} ON)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2008-07-22 03:27:30
|
Revision: 292
http://gearbox.svn.sourceforge.net/gearbox/?rev=292&view=rev
Author: gbiggs
Date: 2008-07-22 03:27:37 +0000 (Tue, 22 Jul 2008)
Log Message:
-----------
Added some registration numbers
Modified Paths:
--------------
gearbox/trunk/src/flexiport/flexiport.cpp
gearbox/trunk/src/flexiport/flexiport.h
gearbox/trunk/src/flexiport/flexiport_types.h
gearbox/trunk/src/flexiport/logfile.cpp
gearbox/trunk/src/flexiport/logfile.h
gearbox/trunk/src/flexiport/logreaderport.cpp
gearbox/trunk/src/flexiport/logreaderport.h
gearbox/trunk/src/flexiport/logwriterport.cpp
gearbox/trunk/src/flexiport/logwriterport.h
gearbox/trunk/src/flexiport/port.cpp
gearbox/trunk/src/flexiport/port.h
gearbox/trunk/src/flexiport/serialport.cpp
gearbox/trunk/src/flexiport/serialport.h
gearbox/trunk/src/flexiport/tcpport.cpp
gearbox/trunk/src/flexiport/tcpport.h
gearbox/trunk/src/flexiport/test/serial_example.cpp
gearbox/trunk/src/flexiport/test/tcp_example.cpp
gearbox/trunk/src/flexiport/timeout.cpp
gearbox/trunk/src/flexiport/timeout.h
gearbox/trunk/src/flexiport/utils/porttoport.cpp
gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
gearbox/trunk/src/hokuyo_aist/hokuyo_aist.h
gearbox/trunk/src/hokuyo_aist/test/example.cpp
Modified: gearbox/trunk/src/flexiport/flexiport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/flexiport.cpp 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/flexiport.cpp 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/flexiport.h
===================================================================
--- gearbox/trunk/src/flexiport/flexiport.h 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/flexiport.h 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/flexiport_types.h
===================================================================
--- gearbox/trunk/src/flexiport/flexiport_types.h 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/flexiport_types.h 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/logfile.cpp
===================================================================
--- gearbox/trunk/src/flexiport/logfile.cpp 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/logfile.cpp 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/logfile.h
===================================================================
--- gearbox/trunk/src/flexiport/logfile.h 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/logfile.h 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/logreaderport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/logreaderport.cpp 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/logreaderport.cpp 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/logreaderport.h
===================================================================
--- gearbox/trunk/src/flexiport/logreaderport.h 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/logreaderport.h 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/logwriterport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/logwriterport.cpp 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/logwriterport.cpp 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/logwriterport.h
===================================================================
--- gearbox/trunk/src/flexiport/logwriterport.h 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/logwriterport.h 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/port.cpp
===================================================================
--- gearbox/trunk/src/flexiport/port.cpp 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/port.cpp 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/port.h
===================================================================
--- gearbox/trunk/src/flexiport/port.h 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/port.h 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/serialport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/serialport.cpp 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/serialport.cpp 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/serialport.h
===================================================================
--- gearbox/trunk/src/flexiport/serialport.h 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/serialport.h 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/tcpport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/tcpport.cpp 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/tcpport.cpp 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/tcpport.h
===================================================================
--- gearbox/trunk/src/flexiport/tcpport.h 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/tcpport.h 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/test/serial_example.cpp
===================================================================
--- gearbox/trunk/src/flexiport/test/serial_example.cpp 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/test/serial_example.cpp 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/test/tcp_example.cpp
===================================================================
--- gearbox/trunk/src/flexiport/test/tcp_example.cpp 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/test/tcp_example.cpp 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/timeout.cpp
===================================================================
--- gearbox/trunk/src/flexiport/timeout.cpp 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/timeout.cpp 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/timeout.h
===================================================================
--- gearbox/trunk/src/flexiport/timeout.h 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/timeout.h 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/flexiport/utils/porttoport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/utils/porttoport.cpp 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/flexiport/utils/porttoport.cpp 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-881
*
* This file is part of flexiport.
*
Modified: gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
===================================================================
--- gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-880
*
* This file is part of hokuyo_aist.
*
Modified: gearbox/trunk/src/hokuyo_aist/hokuyo_aist.h
===================================================================
--- gearbox/trunk/src/hokuyo_aist/hokuyo_aist.h 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/hokuyo_aist/hokuyo_aist.h 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-880
*
* This file is part of hokuyo_aist.
*
Modified: gearbox/trunk/src/hokuyo_aist/test/example.cpp
===================================================================
--- gearbox/trunk/src/hokuyo_aist/test/example.cpp 2008-07-18 01:56:04 UTC (rev 291)
+++ gearbox/trunk/src/hokuyo_aist/test/example.cpp 2008-07-22 03:27:37 UTC (rev 292)
@@ -9,7 +9,7 @@
* this distribution.
*
* This work is a product of the National Institute of Advanced Industrial Science and Technology,
- * Japan. Registration number: ___
+ * Japan. Registration number: H20PRO-880
*
* This file is part of hokuyo_aist.
*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2008-07-18 01:55:56
|
Revision: 291
http://gearbox.svn.sourceforge.net/gearbox/?rev=291&view=rev
Author: gbiggs
Date: 2008-07-18 01:56:04 +0000 (Fri, 18 Jul 2008)
Log Message:
-----------
Set some ignores
Property Changed:
----------------
gearbox/trunk/
gearbox/trunk/doc/
Property changes on: gearbox/trunk
___________________________________________________________________
Added: svn:ignore
+ build
.project
.cproject
.settings
Property changes on: gearbox/trunk/doc
___________________________________________________________________
Added: svn:ignore
+ doxywarn.txt
gearbox.tag
html
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2008-07-14 02:00:40
|
Revision: 290
http://gearbox.svn.sourceforge.net/gearbox/?rev=290&view=rev
Author: gbiggs
Date: 2008-07-13 19:00:48 -0700 (Sun, 13 Jul 2008)
Log Message:
-----------
Replaced deprecated gethostbyname function with getaddrinfo, defined HOST_NAME_MAX on systems that lack it.
Modified Paths:
--------------
gearbox/trunk/src/flexiport/CMakeLists.txt
gearbox/trunk/src/flexiport/flexiport_config.h.in
gearbox/trunk/src/flexiport/tcpport.cpp
Modified: gearbox/trunk/src/flexiport/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/flexiport/CMakeLists.txt 2008-07-12 07:25:25 UTC (rev 289)
+++ gearbox/trunk/src/flexiport/CMakeLists.txt 2008-07-14 02:00:48 UTC (rev 290)
@@ -12,6 +12,12 @@
OPTION (FLEXIPORT_INCLUDE_LOGGING "Include the log reader/writer ports in FlexiPort" ON)
MARK_AS_ADVANCED (FLEXIPORT_INCLUDE_SERIAL FLEXIPORT_INCLUDE_TCP)
+ IF (GBX_OS_QNX)
+ SET (CMAKE_REQUIRED_LIBRARIES socket)
+ ENDIF (GBX_OS_QNX)
+ CHECK_FUNCTION_EXISTS (getaddrinfo FLEXIPORT_HAVE_GETADDRINFO)
+ SET (CMAKE_REQUIRED_LIBRARIES)
+
SET (flexiport_config_h_in ${CMAKE_CURRENT_SOURCE_DIR}/flexiport_config.h.in)
SET (flexiport_config_h ${CMAKE_CURRENT_BINARY_DIR}/flexiport_config.h)
CONFIGURE_FILE (${flexiport_config_h_in} ${flexiport_config_h})
Modified: gearbox/trunk/src/flexiport/flexiport_config.h.in
===================================================================
--- gearbox/trunk/src/flexiport/flexiport_config.h.in 2008-07-12 07:25:25 UTC (rev 289)
+++ gearbox/trunk/src/flexiport/flexiport_config.h.in 2008-07-14 02:00:48 UTC (rev 290)
@@ -2,4 +2,5 @@
#cmakedefine FLEXIPORT_INCLUDE_SERIAL 1
#cmakedefine FLEXIPORT_INCLUDE_TCP 1
-#cmakedefine FLEXIPORT_INCLUDE_LOGGING 1
\ No newline at end of file
+#cmakedefine FLEXIPORT_INCLUDE_LOGGING 1
+#cmakedefine FLEXIPORT_HAVE_GETADDRINFO 1
\ No newline at end of file
Modified: gearbox/trunk/src/flexiport/tcpport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/tcpport.cpp 2008-07-12 07:25:25 UTC (rev 289)
+++ gearbox/trunk/src/flexiport/tcpport.cpp 2008-07-14 02:00:48 UTC (rev 290)
@@ -27,7 +27,12 @@
#include "flexiport.h"
#include "tcpport.h"
+#include "flexiport_config.h"
+#if defined (FLEXIPORT_HAVE_GETADDRINFO)
+ #include <sys/socket.h>
+ #include <netdb.h>
+#endif
#include <sys/types.h>
#include <fcntl.h>
#include <string.h>
@@ -39,7 +44,6 @@
#include <winsock2.h>
#include <ws2tcpip.h>
#define __func__ __FUNCTION__
- #define HOST_NAME_MAX 64
#else
#include <unistd.h>
#include <errno.h>
@@ -48,6 +52,10 @@
#include <netdb.h>
#endif
+#if !defined (HOST_NAME_MAX)
+ #define HOST_NAME_MAX 256
+#endif
+
namespace flexiport
{
@@ -546,8 +554,6 @@
// Connect to a remote server: used when not in listen mode
void TCPPort::Connect (void)
{
- struct hostent *hp = NULL;
-
Close (); // To make sure
_sock = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP);
@@ -565,10 +571,38 @@
sockaddr_in sockAddr;
memset (&sockAddr, 0, sizeof (sockAddr));
+#if defined (FLEXIPORT_HAVE_GETADDRINFO)
+ struct addrinfo *res = NULL, hints;
+ memset (&hints, 0, sizeof (hints));
+ hints.ai_family = AF_INET;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_protocol = IPPROTO_TCP;
+ int errorCode;
+ if ((errorCode = getaddrinfo (_ip.c_str (), NULL, &hints, &res)) != 0)
+ {
+ Close ();
+ stringstream ss;
+#if defined (WIN32)
+ ss << "TCPPort::" << __func__ << "() getaddrinfo() error: (" << ErrNo () << ") " <<
+ StrError (ErrNo ());
+#else
+ ss << "TCPPort::" << __func__ << "() getaddrinfo() error: (" << errorCode << ") " <<
+ gai_strerror (errorCode);
+#endif
+ throw PortException (ss.str ());
+ }
+ memcpy (&sockAddr, res[0].ai_addr, res[0].ai_addrlen);
+ freeaddrinfo (res);
+#else // defined (FLEXIPORT_HAVE_GETADDRINFO)
+ struct hostent *hp = NULL;
if ((hp = gethostbyname (_ip.c_str ())) == NULL)
+ {
+ Close ();
throw PortException (string ("TCPPort::") + __func__ + string (" gethostbyname() error."));
+ }
memcpy (&sockAddr.sin_addr, hp->h_addr, hp->h_length);
sockAddr.sin_family = hp->h_addrtype;
+#endif // defined (FLEXIPORT_HAVE_GETADDRINFO)
sockAddr.sin_port = htons (_port);
if (_debug >= 1)
@@ -628,12 +662,36 @@
else
{
// Listen on the specified interface only
+#if defined (FLEXIPORT_HAVE_GETADDRINFO)
+ struct addrinfo *res = NULL, hints;
+ memset (&hints, 0, sizeof (hints));
+ hints.ai_family = AF_INET;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_protocol = IPPROTO_TCP;
+ int errorCode;
+ if ((errorCode = getaddrinfo (_ip.c_str (), NULL, &hints, &res)) != 0)
+ {
+ Close ();
+ stringstream ss;
+#if defined (WIN32)
+ ss << "TCPPort::" << __func__ << "() getaddrinfo() error: (" << ErrNo () << ") " <<
+ StrError (ErrNo ());
+#else
+ ss << "TCPPort::" << __func__ << "() getaddrinfo() error: (" << errorCode << ") " <<
+ gai_strerror (errorCode);
+#endif
+ throw PortException (ss.str ());
+ }
+ memcpy (&sockAddr, res[0].ai_addr, res[0].ai_addrlen);
+ freeaddrinfo (res);
+#else // defined (FLEXIPORT_HAVE_GETADDRINFO)
if ((hp = gethostbyname (_ip.c_str ())) == NULL)
{
throw PortException (string ("TCPPort::") + __func__ +
string (" gethostbyname() error."));
}
sockAddr.sin_family = hp->h_addrtype;
+#endif // defined (FLEXIPORT_HAVE_GETADDRINFO)
sockAddr.sin_port = htons (_port);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rum...@us...> - 2008-07-12 07:25:16
|
Revision: 289
http://gearbox.svn.sourceforge.net/gearbox/?rev=289&view=rev
Author: rumataxyz
Date: 2008-07-12 00:25:25 -0700 (Sat, 12 Jul 2008)
Log Message:
-----------
corrected copy/paste error
Modified Paths:
--------------
gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp
Modified: gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp
===================================================================
--- gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp 2008-07-12 07:19:38 UTC (rev 288)
+++ gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp 2008-07-12 07:25:25 UTC (rev 289)
@@ -499,7 +499,7 @@
tracer_->info("Turning on raw imu data!");
challenge = ( "log rawimusb onnew\r\n" );
if(false == gnua::sendCmdWaitForResponse(challenge, ack, errorResponse, *(serial_.get()), timeOutMsec)){
- ss.str("");
+ std::stringstream ss;
ss << " Failure!\n Tried to send: " << challenge << " Receiver responded: " << errorResponse;
throw ( gua::Exception(ERROR_INFO, ss.str()));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rum...@us...> - 2008-07-12 07:19:30
|
Revision: 288
http://gearbox.svn.sourceforge.net/gearbox/?rev=288&view=rev
Author: rumataxyz
Date: 2008-07-12 00:19:38 -0700 (Sat, 12 Jul 2008)
Log Message:
-----------
cosmetics, expanded/updated limitations
Modified Paths:
--------------
gearbox/trunk/submitted/gbxnovatelacfr/novatel.dox
Modified: gearbox/trunk/submitted/gbxnovatelacfr/novatel.dox
===================================================================
--- gearbox/trunk/submitted/gbxnovatelacfr/novatel.dox 2008-07-12 07:16:06 UTC (rev 287)
+++ gearbox/trunk/submitted/gbxnovatelacfr/novatel.dox 2008-07-12 07:19:38 UTC (rev 288)
@@ -16,7 +16,8 @@
@defgroup gbx_library_gbxnovatelacfr GbxNovatelAcfr
@brief ACFR driver for a Novatel(SPAN) system.
-This is a proprietary Novatel navigation system. It minimally consists out of a Novatel OEMV GPS receiver (OEM4 receivers should be compatible).
+NovatelSPAN is a proprietary Novatel navigation system.
+It minimally consists out of a Novatel OEMV GPS receiver (OEM4 receivers should be compatible).
If combined with an IMU, a SPAN system can provide an INS navigation solution at high rate (up to 100Hz).
The driver initialises the hardware and reports navigation data continously.
@@ -43,7 +44,7 @@
LGPL
@par Dependencies.
-- @ref gbx_library_gbxserialacfr
+ @ref gbx_library_gbxserialacfr
@par Example
@@ -64,8 +65,8 @@
@par Minimal Example
This example (no error checking for clarity, but fully functional) shows the driver's intended usage:
-- create configuration
-- create driver
+- create configuration (see @ref gbxnovatelacfr::Config, @ref gbxnovatelacfr::SimpleConfig and @ref gbxnovatelacfr::GpsOnlyConfig)
+- create driver (@ref gbxnovatelacfr::Driver)
- read from driver and wait for external termination
@verbatim
@@ -139,7 +140,8 @@
@par References
-This driver was programmed based on the protocoll/message descriptions in Novatel manuals, it does not contain any code from Novatel. The main source for information was:
+This driver was programmed based on the protocoll/message descriptions in Novatel's manuals, it does not contain any code from Novatel.
+The main source for information was:
- http://www.novatel.com/Documents/Manuals/om-20000094.pdf (Novatel OEMV reference)
- http://www.novatel.com/Documents/Manuals/om-20000104.pdf (SPAN-system manual)
@@ -150,10 +152,25 @@
@par Limitations
-- This is a Linux-only implementation (because of the serial library and the system-calls for timestamps)
-- Only supports a subset of the messages a NovatelSPAN system can provide.
+- This is a Linux-only implementation (because of the serial library and the system-calls for timestamps,
+this might change in the future, particularly if there is user-demand)
+- Only supports a subset of the messages a NovatelSPAN system can provide, this can be extended, but only if there is demand.
+- The binary parser currently works on little endian architectures (e.g. x86) only. This is checked at run-time.
- Driver currently treats the hardware as data-source only, communication _to_ the hardware is possible only during initialization.
-- Driver doesn't check if configuring the receiver was successful/as-intended
+- Driver does limited checking if configuring the receiver was successful/as-intended:
+ - Driver checks for 'acks' for commands, reports 'no-acks' and retries
+ - This detects malformed commands _only_
+ - The receiver (and hence the driver) will accept commands to e.g. setup an IMU, even if no IMU is present
+- Driver does not deal with persistent storage:
+ - It is possible to make settings persistent between sessions (receiver command 'saveconfig').
+ Our driver does not use this command, but it could have been used manually.
+ - There are cases where persistent settings could interfere with normal operation of the driver. This is particularly likely
+ to happen when the hardware is shared between projects. There is no easy way to test for this, and the current implementation
+ ignores the problem completely (the user is always right).
+ - Workaround: To make sure that there are no lingering persisten settings,
+ use the receiver's 'freset' command to bring it back to factory-defaults. The driver itself does not do this,
+ on the grounds that it also might delete settings that were made persistent with good reason and purpose.
+ If you are shareing equipment, check with everybody involved, before you use this approach.
*/
/*!
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rum...@us...> - 2008-07-12 07:15:59
|
Revision: 287
http://gearbox.svn.sourceforge.net/gearbox/?rev=287&view=rev
Author: rumataxyz
Date: 2008-07-12 00:16:06 -0700 (Sat, 12 Jul 2008)
Log Message:
-----------
slowing down in case of initialisation error
Modified Paths:
--------------
gearbox/trunk/submitted/gbxnovatelacfr/test/test.cpp
Modified: gearbox/trunk/submitted/gbxnovatelacfr/test/test.cpp
===================================================================
--- gearbox/trunk/submitted/gbxnovatelacfr/test/test.cpp 2008-07-12 07:15:14 UTC (rev 286)
+++ gearbox/trunk/submitted/gbxnovatelacfr/test/test.cpp 2008-07-12 07:16:06 UTC (rev 287)
@@ -141,10 +141,12 @@
driver.reset( new gna::Driver( *(cfg.get()) ) );
}
catch(std::exception &e){
- cout << e.what() << "\n";
+ cout << e.what() << "\nWaiting 5 sec before re-trying.\n\n";
+ sleep(5);
}
catch(...){
- cout << "caught unknown exception!\n";
+ cout << "caught unknown exception!\nWaiting 5 sec before re-trying.\n\n";
+ sleep(5);
}
}while(0 == driver.get() && errorCnt++<5); // try up to 5 times
//check that we succeeded
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rum...@us...> - 2008-07-12 07:15:05
|
Revision: 286
http://gearbox.svn.sourceforge.net/gearbox/?rev=286&view=rev
Author: rumataxyz
Date: 2008-07-12 00:15:14 -0700 (Sat, 12 Jul 2008)
Log Message:
-----------
checking for acks in requestData(), some cosmetics in toString()s
Modified Paths:
--------------
gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp
Modified: gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp
===================================================================
--- gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp 2008-07-12 07:12:56 UTC (rev 285)
+++ gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp 2008-07-12 07:15:14 UTC (rev 286)
@@ -9,6 +9,7 @@
*/
#include <gbxnovatelacfr/driver.h>
+
#include <gbxnovatelacfr/gbxnovatelutilacfr/serialconnectivity.h>
#include <gbxnovatelacfr/gbxnovatelutilacfr/novatelmessages.h>
#include <gbxnovatelacfr/gbxnovatelutilacfr/imudecoder.h>
@@ -74,7 +75,7 @@
// this guy checks if the assumptions for the gear above are correct (abort()s through assert() otherwise)
void checkParserAssumptions();
- // returns the id of the message it received (in msg), or throws an gbxutilacfr::Exception
+ // returns the id of the message it read (msg), or throws an gbxutilacfr::Exception
uint16_t readNovatelMessage(union NovatelMessage &msg, struct timeval &timeStamp, gbxserialacfr::Serial *serial);
// take novatel data and create stuff according to our external api
@@ -451,8 +452,9 @@
ss << "log bestgpsposb ontime " << config_.dtGpsPos_ << "\r\n";
challenge = ss.str();
if(false == gnua::sendCmdWaitForResponse(challenge, ack, errorResponse, *(serial_.get()), timeOutMsec)){
- //throw ( gua::Exception(ERROR_INFO, errorResponse));
- // unfortunately this simple approach doesn't work here. The 'ack' is usually lost in the binary data we've just requested
+ ss.str("");
+ ss << " Failure!\n Tried to send: " << challenge << " Receiver responded: " << errorResponse;
+ throw ( gua::Exception(ERROR_INFO, ss.str()));
}
}
@@ -465,8 +467,9 @@
ss << "log bestgpsvelb ontime " << config_.dtGpsVel_ << "\r\n";
challenge = ss.str();
if(false == gnua::sendCmdWaitForResponse(challenge, ack, errorResponse, *(serial_.get()), timeOutMsec)){
- //throw ( gua::Exception(ERROR_INFO, errorResponse));
- // unfortunately this simple approach doesn't work here. The 'ack' is usually lost in the binary data we've just requested
+ ss.str("");
+ ss << " Failure!\n Tried to send: " << challenge << " Receiver responded: " << errorResponse;
+ throw ( gua::Exception(ERROR_INFO, ss.str()));
}
}
@@ -482,8 +485,9 @@
ss << "log inspvasb ontime " << config_.dtInsPva_ << "\r\n";
challenge = ss.str();
if(false == gnua::sendCmdWaitForResponse(challenge, ack, errorResponse, *(serial_.get()), timeOutMsec)){
- //throw ( gua::Exception(ERROR_INFO, errorResponse));
- // unfortunately this simple approach doesn't work here. The 'ack' is usually lost in the binary data we've just requested
+ ss.str("");
+ ss << " Failure!\n Tried to send: " << challenge << " Receiver responded: " << errorResponse;
+ throw ( gua::Exception(ERROR_INFO, ss.str()));
}
}
@@ -495,8 +499,9 @@
tracer_->info("Turning on raw imu data!");
challenge = ( "log rawimusb onnew\r\n" );
if(false == gnua::sendCmdWaitForResponse(challenge, ack, errorResponse, *(serial_.get()), timeOutMsec)){
- //throw ( gua::Exception(ERROR_INFO, errorResponse));
- // unfortunately this simple approach doesn't work here. The 'ack' is usually lost in the binary data we've just requested
+ ss.str("");
+ ss << " Failure!\n Tried to send: " << challenge << " Receiver responded: " << errorResponse;
+ throw ( gua::Exception(ERROR_INFO, ss.str()));
}
}
@@ -839,12 +844,12 @@
ss << "sigmaLatitude " << sigmaLatitude << " ";
ss << "sigmaLongitude " << sigmaLongitude << " ";
ss << "sigmaHeight " << sigmaHeight << " ";
- ss << "baseStationId "
+ ss << "baseStationId ["
<< baseStationId[0]
<< baseStationId[1]
<< baseStationId[2]
<< baseStationId[3]
- << " ";
+ << "] ";
ss << "diffAge " << diffAge << " ";
ss << "solutionAge " << solutionAge << " ";
ss << "numObservations " << numObservations << " ";
@@ -1343,9 +1348,11 @@
std::string doubleVectorToString(vector<double > &vec, std::string seperator){
std::stringstream ss;
int max = vec.size();
+ ss << "[";
for (int i=0; i<max; i++){
ss << vec[i] << seperator;
}
+ ss << "]";
return ss.str();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rum...@us...> - 2008-07-12 07:12:49
|
Revision: 285
http://gearbox.svn.sourceforge.net/gearbox/?rev=285&view=rev
Author: rumataxyz
Date: 2008-07-12 00:12:56 -0700 (Sat, 12 Jul 2008)
Log Message:
-----------
sendCmdWaitForResponse() works now even if it reads binary data along with an ack (somewhat hackish).
Modified Paths:
--------------
gearbox/trunk/submitted/gbxnovatelacfr/gbxnovatelutilacfr/serialconnectivity.cpp
Modified: gearbox/trunk/submitted/gbxnovatelacfr/gbxnovatelutilacfr/serialconnectivity.cpp
===================================================================
--- gearbox/trunk/submitted/gbxnovatelacfr/gbxnovatelutilacfr/serialconnectivity.cpp 2008-07-11 07:19:30 UTC (rev 284)
+++ gearbox/trunk/submitted/gbxnovatelacfr/gbxnovatelutilacfr/serialconnectivity.cpp 2008-07-12 07:12:56 UTC (rev 285)
@@ -94,7 +94,14 @@
assert( read != -1 );
//and look for an ACK
+ //it's possible that we have read binary data with embedded '\0'; we want one at the end (string delimeter), but replace the rest with '\1'
buf[read] = '\0';
+ while(0<read){
+ read--;
+ if('\0' == buf[read]){
+ buf[read] = '\1';
+ }
+ }
std::string response(buf);
size_t found = response.find(ack);
if(std::string::npos != found){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rum...@us...> - 2008-07-11 07:19:24
|
Revision: 284
http://gearbox.svn.sourceforge.net/gearbox/?rev=284&view=rev
Author: rumataxyz
Date: 2008-07-11 00:19:30 -0700 (Fri, 11 Jul 2008)
Log Message:
-----------
error reporting a bit more specific
Modified Paths:
--------------
gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp
Modified: gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp
===================================================================
--- gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp 2008-07-11 06:47:17 UTC (rev 283)
+++ gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp 2008-07-11 07:19:30 UTC (rev 284)
@@ -42,7 +42,6 @@
namespace gua = gbxutilacfr;
namespace {
-// binary messages defined by novatel
#pragma pack(push,1)
// Our quick and dirty message-decoder
// Maximum size is (legacy) hardcoded to 516bytes. The real upper limit (for long headers) would be 65535+28+4 bytes.
@@ -75,7 +74,10 @@
// this guy checks if the assumptions for the gear above are correct (abort()s through assert() otherwise)
void checkParserAssumptions();
+ // returns the id of the message it received (in msg), or throws an gbxutilacfr::Exception
uint16_t readNovatelMessage(union NovatelMessage &msg, struct timeval &timeStamp, gbxserialacfr::Serial *serial);
+
+ // take novatel data and create stuff according to our external api
std::auto_ptr<gna::GenericData> createExternalMsg(gnua::InsPvaLogSB &insPva, struct timeval &timeStamp);
std::auto_ptr<gna::GenericData> createExternalMsg(gnua::BestGpsPosLogB &bestGpsPos, struct timeval &timeStamp);
std::auto_ptr<gna::GenericData> createExternalMsg(gnua::BestGpsVelLogB &bestGpsVel, struct timeval &timeStamp);
@@ -925,7 +927,7 @@
// skip everything until we get the first sync byte
do{
if( 1 != serial->readFull( &msg.header.sb1, 1 )){
- throw ( gua::Exception(ERROR_INFO, "Failure while trying to read sync byte 1 (possibly timeout) " ) );
+ throw ( gua::Exception(ERROR_INFO, "Timed out while trying to read sync byte 1") );
}
}while( msg.header.sb1 != 0xaa );
@@ -933,12 +935,16 @@
gettimeofday(&timeStamp, NULL);
// read the second and third sync byte
- if( 1 != serial->readFull( &msg.header.sb2, 1 )
- || msg.header.sb2 != 0x44 ) {
- throw ( gua::Exception(ERROR_INFO, "Failure while trying to read sync byte 2 (possibly timeout) " ) );
+ if( 1 != serial->readFull( &msg.header.sb2, 1) ){
+ throw ( gua::Exception(ERROR_INFO, "Timed out while trying to read sync byte 2" ) );
}
+ if (msg.header.sb2 != 0x44 ) {
+ std::stringstream ss;
+ ss << "Expected sync byte 2 (0x44) got: " << hex << msg.header.sb2;
+ throw ( gua::Exception(ERROR_INFO, ss.str()) );
+ }
if( 1 != serial->readFull( &msg.header.sb3, 1 )){
- throw ( gua::Exception(ERROR_INFO, "Failure while trying to read sync byte 3 (possibly timeout) " ) );
+ throw ( gua::Exception(ERROR_INFO, "Timed out while trying to read sync byte 3") );
}
// figure out what binary format we have, and read the full packet
@@ -951,7 +957,7 @@
// read the message data plus 4 bytes for the crc
|| msg.header.msgLength+4 != serial->readFull( &msg.data, msg.header.msgLength+4 )
){
- throw ( gua::Exception(ERROR_INFO, "Failure while trying to read long packet (possibly timeout) " ) );
+ throw ( gua::Exception(ERROR_INFO, "Timed out while trying to read long packet") );
}
id = msg.header.msgId;
@@ -966,7 +972,7 @@
9 != serial->readFull( &msg.shortHeader.msgLength, 9 )
|| msg.shortHeader.msgLength+4 != serial->readFull( &msg.shortData, msg.shortHeader.msgLength+4 )
){
- throw ( gua::Exception(ERROR_INFO, "Failure while trying to read short packet (possibly timeout) " ) );
+ throw ( gua::Exception(ERROR_INFO, "Timed out while trying to read short packet") );
}
id = msg.shortHeader.msgId;
@@ -1364,7 +1370,7 @@
default:
ss << "UnknownStatus" << " ";
}
- ss << statusMessage;
+ ss << "[" << statusMessage << "]";
return ss.str();
}
}//namespace
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rum...@us...> - 2008-07-11 06:47:08
|
Revision: 283
http://gearbox.svn.sourceforge.net/gearbox/?rev=283&view=rev
Author: rumataxyz
Date: 2008-07-10 23:47:17 -0700 (Thu, 10 Jul 2008)
Log Message:
-----------
Added decoding for gpsPos/VelStatus/Type.
Simplified readNovatelMessage() some more.
Added more checking/robustified the dodgy parser
Modified Paths:
--------------
gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp
Modified: gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp
===================================================================
--- gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp 2008-07-11 06:43:33 UTC (rev 282)
+++ gearbox/trunk/submitted/gbxnovatelacfr/driver.cpp 2008-07-11 06:47:17 UTC (rev 283)
@@ -44,16 +44,24 @@
namespace {
// binary messages defined by novatel
#pragma pack(push,1)
- union novatelMessage{
+ // Our quick and dirty message-decoder
+ // Maximum size is (legacy) hardcoded to 516bytes. The real upper limit (for long headers) would be 65535+28+4 bytes.
+ // Problems should hopefully be picked up by checkParserAssumptions().
+ //
+ // Todo: write a proper parser
+ static const int rawMsgSize = 516; // maximum size of message we can decode (including header, crc, and data)
+ static const int longMsgDataSize = rawMsgSize - sizeof(gnua::Oem4BinaryHeader);
+ static const int shortMsgDataSize = rawMsgSize - sizeof(gnua::Oem4ShortBinaryHeader);
+ union NovatelMessage{
struct{
gnua::Oem4BinaryHeader header;
- char data[484];
+ uint8_t data[longMsgDataSize];
};
struct{
gnua::Oem4ShortBinaryHeader shortHeader;
- char shortData[500];
+ uint8_t shortData[shortMsgDataSize];
};
- unsigned char rawMessage[512];
+ uint8_t rawMessage[rawMsgSize];
// these guys are used to directly decode messages;
// obviously fails on endian mismatch, any sort of size mismatch and is rather nasty in general;
@@ -67,11 +75,13 @@
// this guy checks if the assumptions for the gear above are correct (abort()s through assert() otherwise)
void checkParserAssumptions();
- int readNovatelMessage(union novatelMessage &msg, struct timeval &timeStamp, gbxserialacfr::Serial *serial);
+ uint16_t readNovatelMessage(union NovatelMessage &msg, struct timeval &timeStamp, gbxserialacfr::Serial *serial);
std::auto_ptr<gna::GenericData> createExternalMsg(gnua::InsPvaLogSB &insPva, struct timeval &timeStamp);
std::auto_ptr<gna::GenericData> createExternalMsg(gnua::BestGpsPosLogB &bestGpsPos, struct timeval &timeStamp);
std::auto_ptr<gna::GenericData> createExternalMsg(gnua::BestGpsVelLogB &bestGpsVel, struct timeval &timeStamp);
std::auto_ptr<gna::GenericData> createExternalMsg(gnua::RawImuLogSB &rawImu, struct timeval &timeStamp, gnua::ImuDecoder *imuDecoder);
+ enum gna::GpsSolutionStatusType externalGpsSolutionStatus(uint32_t novatelGpsSolutionStatus);
+ enum gna::GpsPosVelType externalGpsPosVelType(uint32_t novatelGpsPosVelType);
// helper functions for the toString() gear
std::string statusToString(gna::StatusMessageType statusMessageType, std::string statusMessage);
@@ -493,7 +503,7 @@
std::auto_ptr<GenericData>
Driver::read(){
- union novatelMessage msg;
+ union NovatelMessage msg;
std::auto_ptr<GenericData> data;
data.reset(0);
struct timeval timeStamp = {0,0};
@@ -852,7 +862,7 @@
ss << "gpsWeekNr " << gpsWeekNr << " ";
ss << "msIntoWeek " << msIntoWeek << " ";
ss << "solutionStatus " << solutionStatus << " ";
- ss << "positionType " << positionType << " ";
+ ss << "velocityType " << velocityType << " ";
ss << "latency " << std::fixed << std::setprecision(4) << latency << " ";
ss << "diffAge " << diffAge << " ";
ss << "horizontalSpeed " << horizontalSpeed << " ";
@@ -885,9 +895,11 @@
namespace{
void
checkParserAssumptions(){
- assert((8 == CHAR_BIT) && "Sorry our parser won't work on this platform");
- assert((8 == sizeof(double)) && "Sorry our parser won't work on this platform");
- assert((4 == sizeof(float)) && "Sorry our parser won't work on this platform");
+ // we have a fairly dodgy parser, which makes unsound assumptions about the binary layout of things in memory.
+ // This gear makes sure that we fail at runtime instead of delivering garbage.
+ assert((8 == CHAR_BIT) && "Unsupported size of byte: our parser won't work on this platform");
+ assert((8 == sizeof(double)) && "Unsupported size of double: our parser won't work on this platform");
+ assert((4 == sizeof(float)) && "Unsupported size of float: our parser won't work on this platform");
union EndianCheck{
uint32_t full;
@@ -898,22 +910,22 @@
endianCheck.bytes[1] = 0x43;
endianCheck.bytes[2] = 0x65;
endianCheck.bytes[3] = 0x87;
- assert(0x87654321 == endianCheck.full && "Sorry our parser won't work on this platform");
+ assert(0x87654321 == endianCheck.full && "Unsupported endianness: our parser won't work on this platform");
+ assert(rawMsgSize == sizeof(union NovatelMessage)
+ && "Overflow: Someone included a log definition in [NovatelMessage] which is bigger than the buffer for it"
+ && "Depending on the pickiness of your hardware this might actually work, but I'll shut down on general principle");
return;
}
- int
- readNovatelMessage(union novatelMessage &msg, struct timeval &timeStamp, gbxserialacfr::Serial *serial) {
- // read the three sync bytes which are always at the start of the message header
- unsigned short id = -1;
- unsigned long crc;
- unsigned long in_crc;
+ uint16_t
+ readNovatelMessage(union NovatelMessage &msg, struct timeval &timeStamp, gbxserialacfr::Serial *serial) {
+ uint16_t id = -1;
msg.header.sb1 = 0;
// skip everything until we get the first sync byte
do{
if( 1 != serial->readFull( &msg.header.sb1, 1 )){
- throw ( gua::Exception(ERROR_INFO, "Failure while reading trying to read sync byte 1 (possibly timeout) " ) );
+ throw ( gua::Exception(ERROR_INFO, "Failure while trying to read sync byte 1 (possibly timeout) " ) );
}
}while( msg.header.sb1 != 0xaa );
@@ -923,62 +935,56 @@
// read the second and third sync byte
if( 1 != serial->readFull( &msg.header.sb2, 1 )
|| msg.header.sb2 != 0x44 ) {
- throw ( gua::Exception(ERROR_INFO, "Failure while reading trying to read sync byte 2 (possibly timeout) " ) );
+ throw ( gua::Exception(ERROR_INFO, "Failure while trying to read sync byte 2 (possibly timeout) " ) );
}
if( 1 != serial->readFull( &msg.header.sb3, 1 )){
- throw ( gua::Exception(ERROR_INFO, "Failure while reading trying to read sync byte 3 (possibly timeout) " ) );
+ throw ( gua::Exception(ERROR_INFO, "Failure while trying to read sync byte 3 (possibly timeout) " ) );
}
+ // figure out what binary format we have, and read the full packet
switch( msg.header.sb3 ) {
case 0x12: //long packet
if( // how long is the header ?
1 != serial->readFull( &msg.header.headerLength, 1 )
- // read all of the header...
+ // read all of the header
|| msg.header.headerLength-4 != serial->readFull( &msg.header.msgId, msg.header.headerLength-4 )
- // read the message data
- || msg.header.msgLength != serial->readFull( &msg.data, msg.header.msgLength )
- || 4 != serial->readFull( &in_crc, 4 )
+ // read the message data plus 4 bytes for the crc
+ || msg.header.msgLength+4 != serial->readFull( &msg.data, msg.header.msgLength+4 )
){
- throw ( gua::Exception(ERROR_INFO, "Failure while reading trying to read long packet (possibly timeout) " ) );
+ throw ( gua::Exception(ERROR_INFO, "Failure while trying to read long packet (possibly timeout) " ) );
}
id = msg.header.msgId;
- crc = gnua::crc( msg.rawMessage,
- msg.header.msgLength+msg.header.headerLength );
+ if(0 != gnua::crc( msg.rawMessage, msg.header.msgLength+msg.header.headerLength+4 )){
+ throw ( gua::Exception(ERROR_INFO, "CRC Error" ) );
+ }
break;
case 0x13: //short packet
- if( // read rest of the header 12 bytes - 3 bytes already read, then the actual data, then the CRC
+ if( // read rest of the header 12 bytes - 3 bytes already read, then the actual data plus 4 bytes for the CRC
9 != serial->readFull( &msg.shortHeader.msgLength, 9 )
- || msg.shortHeader.msgLength != serial->readFull( &msg.shortData, msg.shortHeader.msgLength )
- || 4 != serial->readFull( &in_crc, 4 )
+ || msg.shortHeader.msgLength+4 != serial->readFull( &msg.shortData, msg.shortHeader.msgLength+4 )
){
- throw ( gua::Exception(ERROR_INFO, "Failure while reading trying to read short packet (possibly timeout) " ) );
+ throw ( gua::Exception(ERROR_INFO, "Failure while trying to read short packet (possibly timeout) " ) );
}
id = msg.shortHeader.msgId;
- crc = gnua::crc( msg.rawMessage,msg.shortHeader.msgLength + 12 );
+ if( 0 != gnua::crc( msg.rawMessage,msg.shortHeader.msgLength + 16 )){
+ throw ( gua::Exception(ERROR_INFO, "CRC Error" ) );
+ }
break;
default: //bollocks
- throw ( gua::Exception(ERROR_INFO, "Unknown binary packet type" ) );
+ throw ( gua::Exception(ERROR_INFO, "Unknown binary packet format" ) );
}
-
- if(in_crc != crc) {
- throw ( gua::Exception(ERROR_INFO, "CRC Error" ) );
- return -1;
- }
-
return id;
}
std::auto_ptr<gna::GenericData>
createExternalMsg(gnua::InsPvaLogSB &insPva, struct timeval &timeStamp){
- //static int cnt;
- //if(0 == cnt++ % 1000) cout << __func__ << " ins; implement me properly!\n";
gna::InsPvaData *data = new gna::InsPvaData;
std::auto_ptr<gna::GenericData> genericData( data );
@@ -1003,7 +1009,7 @@
switch( insPva.data.insStatus ) {
case 0:
data->statusMessage = "Ins is inactive";
- data->statusMessageType = gna::Fault; // TODO: check if this happens during startup
+ data->statusMessageType = gna::Initialising; // TODO: how can we distinguish between the startup-behavior and a genuine fault during operation?? Timer from when we first established a connection?
break;
case 1:
data->statusMessage = "Ins is aligning";
@@ -1049,16 +1055,14 @@
std::auto_ptr<gna::GenericData>
createExternalMsg(gnua::BestGpsPosLogB &bestGpsPos, struct timeval &timeStamp){
- static int cnt;
- if(0 == cnt++ % 100) cout << __func__ << " gpspos; implement me properly!\n";
gna::BestGpsPosData *data = new gna::BestGpsPosData;
std::auto_ptr<gna::GenericData> genericData( data );
//data
data->gpsWeekNr = bestGpsPos.header.gpsWeekNr;
data->msIntoWeek = bestGpsPos.header.msIntoWeek;
- //data->solutionStatus = bestGpsPos.data.solutionStatus;
- //data->positionType = bestGpsPos.data.positionType;
+ data->solutionStatus = externalGpsSolutionStatus( bestGpsPos.data.solutionStatus );
+ data->positionType = externalGpsPosVelType( bestGpsPos.data.positionType );
data->latitude = bestGpsPos.data.latitude;
data->longitude = bestGpsPos.data.longitude;
data->heightAMSL = bestGpsPos.data.heightAMSL;
@@ -1139,16 +1143,14 @@
std::auto_ptr<gna::GenericData>
createExternalMsg(gnua::BestGpsVelLogB &bestGpsVel, struct timeval &timeStamp){
- static int cnt;
- if(0 == cnt++ % 100) cout << __func__ << " gpsvel; implement me properly!\n";
gna::BestGpsVelData *data = new gna::BestGpsVelData;
std::auto_ptr<gna::GenericData> genericData( data );
//data
data->gpsWeekNr = bestGpsVel.header.gpsWeekNr;
data->msIntoWeek = bestGpsVel.header.msIntoWeek;
- //data->solutionStatus = bestGpsVel.data.solutionStatus;
- //data->velocityType = bestGpsVel.data.velocityType;
+ data->solutionStatus = externalGpsSolutionStatus( bestGpsVel.data.solutionStatus );
+ data->velocityType = externalGpsPosVelType( bestGpsVel.data.velocityType );
data->latency = bestGpsVel.data.latency;
data->diffAge = bestGpsVel.data.diffAge;
data->horizontalSpeed = bestGpsVel.data.horizontalSpeed;
@@ -1219,8 +1221,6 @@
std::auto_ptr<gna::GenericData>
createExternalMsg(gnua::RawImuLogSB &rawImu, struct timeval &timeStamp, gnua::ImuDecoder *imuDecoder){
- //static int cnt;
- //if(0 == cnt++ % 500) cout << __func__ << " imu; implement me properly!\n";
gna::RawImuData *data = new gna::RawImuData;
std::auto_ptr<gna::GenericData> genericData( data );
@@ -1231,7 +1231,6 @@
data->zDeltaV = imuDecoder->accelCnt2MperSec(rawImu.data.zAccelCnt);
data->yDeltaV = -1.0*imuDecoder->accelCnt2MperSec(rawImu.data.yNegativAccelCnt);
data->xDeltaV = imuDecoder->accelCnt2MperSec(rawImu.data.xAccelCnt);
- //std::cout << "\nCnt " << rawImu.data.xAccelCnt << " decoded " << data->xDeltaV << "\n";
//gyros
data->zDeltaAng = imuDecoder->gyroCnt2Rad(rawImu.data.zGyroCnt);
data->yDeltaAng = -1.0*imuDecoder->gyroCnt2Rad(rawImu.data.yNegativGyroCnt);
@@ -1264,6 +1263,77 @@
return genericData;
}
+ enum gna::GpsSolutionStatusType externalGpsSolutionStatus(uint32_t novatelGpsSolutionStatus){
+ enum gna::GpsSolutionStatusType external;
+ switch(novatelGpsSolutionStatus){
+ case 0: external = gna::SolComputed; break;
+ case 1: external = gna::InsufficientObs; break;
+ case 2: external = gna::NoConvergence; break;
+ case 3: external = gna::Singularity; break;
+ case 4: external = gna::CovTrace; break;
+ case 5: external = gna::TestDist; break;
+ case 6: external = gna::ColdStart; break;
+ case 7: external = gna::VHLimit; break;
+ case 8: external = gna::Variance; break;
+ case 9: external = gna::Residuals; break;
+ case 10: external = gna::DeltaPos; break;
+ case 11: external = gna::NegativeVar; break;
+ case 13: external = gna::IntegrityWarning; break;
+ case 14: external = gna::InsInactive; break;
+ case 15: external = gna::InsAligning; break;
+ case 16: external = gna::InsBad; break;
+ case 17: external = gna::ImuUnplugged; break;
+ case 18: external = gna::Pending; break;
+ case 19: external = gna::InvalidFix; break;
+
+ case 12: external = gna::ReservedGpsSolutionStatusType; break;
+ default: external = gna::UnknownGpsSolutionStatusType; break;
+ }
+ return external;
+ }
+
+ enum gna::GpsPosVelType externalGpsPosVelType(uint32_t novatelGpsPosVelType){
+ enum gna::GpsPosVelType external;
+ switch(novatelGpsPosVelType){
+ case 0: external = gna::None; break;
+ case 1: external = gna::FixedPos; break;
+ case 2: external = gna::FixedHeight; break;
+ case 4: external = gna::FloatConv; break;
+ case 5: external = gna::WideLane; break;
+ case 6: external = gna::NarrowLane; break;
+ case 8: external = gna::DopplerVelocity; break;
+ case 16: external = gna::Single; break;
+ case 17: external = gna::PsrDiff; break;
+ case 18: external = gna::Waas; break;
+ case 19: external = gna::Propagated; break;
+ case 20: external = gna::Omnistar; break;
+ case 32: external = gna::L1Float; break;
+ case 33: external = gna::IonoFreeFloat; break;
+ case 34: external = gna::NarrowFloat; break;
+ case 48: external = gna::L1Int; break;
+ case 49: external = gna::WideInt; break;
+ case 50: external = gna::NarrowInt; break;
+ case 51: external = gna::RtkDirectIns; break;
+ case 52: external = gna::Ins; break;
+ case 53: external = gna::InsPsrSp; break;
+ case 54: external = gna::InsPsrDiff; break;
+ case 55: external = gna::InsRtkFloat; break;
+ case 56: external = gna::InsRtkFixed; break;
+ case 64: external = gna::OmniStarHp; break;
+ case 65: external = gna::OmniStarXp; break;
+ case 66: external = gna::CdGps; break;
+
+ case 3: //fallthrough
+ case 7: //fallthrough
+ case 9: case 10: case 11: case 12: case 13: case 14: case 15: //fallthrough
+ case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 28: case 29: case 30: case 31: //fallthrough
+ // these guys are _not_ named as reserved in the manual case 34: case 35: case 36: case 37: case 38: case 38: case 39: case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47:
+ external = gna::ReservedGpsPosVelType; break;
+ default: external = gna::UnknownGpsPosVelType; break;
+ }
+ return external;
+ }
+
std::string doubleVectorToString(vector<double > &vec, std::string seperator){
std::stringstream ss;
int max = vec.size();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|