Permalink
Browse files

MR Changes

git-svn-id: https://orca-robotics.svn.sf.net/svnroot/orca-robotics/orca/trunk@5706 534d5172-be3c-0410-9a3e-ccaa6372a113
  • Loading branch information...
1 parent 3e979ba commit 984bc13cf6d726735cadf49827afd306629bbd68 borax00 committed Feb 1, 2010
Showing with 1,217 additions and 578 deletions.
  1. +16 −0 doc/todo.dox
  2. +1 −0 scripts/matlab/sloccount/slocs.m
  3. +10 −17 src/components/bicycle/netthread.cpp
  4. +15 −20 src/components/faithlocaliser3d/mainthread.cpp
  5. +1 −1 src/components/propertyserver/CMakeLists.txt
  6. +12 −12 src/components/propertyserver/mainthread.cpp
  7. +2 −2 src/components/propertyserver/mainthread.h
  8. +2 −2 src/components/segwayrmp/mainthread.cpp
  9. +2 −5 src/components/wifi/fakedriver.cpp
  10. +3 −2 src/components/wifi/mainthread.cpp
  11. +70 −113 src/hydrodrivers/hydrosegwayrmpacfr/canio/canpeakrmpio.cpp
  12. +5 −7 src/hydrodrivers/hydrosegwayrmpacfr/canio/canpeakrmpio.h
  13. +122 −0 src/hydrodrivers/hydrosegwayrmpacfr/canio/peakutil.cpp
  14. +21 −0 src/hydrodrivers/hydrosegwayrmpacfr/canio/peakutil.h
  15. +6 −5 src/hydrodrivers/hydrosegwayrmpacfr/canio/test/CMakeLists.txt
  16. +37 −0 src/hydrodrivers/hydrosegwayrmpacfr/canio/test/canpeakrmpiotest.cpp
  17. 0 src/hydrodrivers/hydrosegwayrmpacfr/canio/test/{main.cpp → rmptestcan.cpp}
  18. +72 −0 src/hydrodrivers/hydrosegwayrmpacfr/canio/test/testreadfromcan.cpp
  19. +7 −2 src/hydrodrivers/hydrosegwayrmpacfr/canpacket.cpp
  20. +2 −2 src/hydrodrivers/hydrosegwayrmpacfr/canpacket.h
  21. +0 −1 src/hydrodrivers/hydrosegwayrmpacfr/driver.cpp
  22. +0 −8 src/hydrodrivers/hydrosegwayrmpacfr/rawrxdata.cpp
  23. +1 −1 src/hydrodrivers/hydrosegwayrmpacfr/util/CMakeLists.txt
  24. 0 src/hydrodrivers/hydrosegwayrmpacfr/util/{test.cpp → hydrosegwayrmpacfrcantest.cpp}
  25. +1 −0 src/hydrolibs/CMakeLists.txt
  26. +172 −31 src/hydrolibs/hydrocolourtext/test/colourtest.cpp
  27. +2 −2 src/hydrolibs/hydronavutil/cov2d.h
  28. +2 −2 src/hydrolibs/hydronavutil/cov3d.h
  29. +2 −2 src/hydrolibs/hydronavutil/offset.h
  30. +2 −2 src/hydrolibs/hydronavutil/pose.h
  31. +24 −0 src/hydrolibs/hydropropertydb/CMakeLists.txt
  32. +1 −1 src/{components/propertyserver → hydrolibs/hydropropertydb}/propertydb.cpp
  33. +4 −4 src/{components/propertyserver → hydrolibs/hydropropertydb}/propertydb.h
  34. +3 −0 src/hydrolibs/hydroqguipath/ipathinput.h
  35. +76 −37 src/hydrolibs/hydroqguipath/simplepathdesigntablewidget.cpp
  36. +8 −11 src/hydrolibs/hydroqguipath/simplepathdesigntablewidget.h
  37. +33 −23 src/hydrolibs/hydroutil/stringutils.cpp
  38. +10 −8 src/hydrolibs/hydroutil/stringutils.h
  39. +31 −2 src/hydrolibs/hydrowifi/wifiutil.h
  40. +36 −3 src/interfaces/slice/orca/test.ice
  41. +7 −6 src/libs/orcaice/component.cpp
  42. +12 −23 src/libs/orcaice/component.h
  43. +6 −3 src/libs/orcaice/context.cpp
  44. +13 −4 src/libs/orcaice/context.h
  45. +79 −12 src/libs/orcaice/detail/componentthread.cpp
  46. +13 −3 src/libs/orcaice/detail/componentthread.h
  47. +5 −5 src/libs/orcaice/multiiceutils.cpp
  48. +12 −12 src/libs/orcaice/multiiceutils.h
  49. +9 −9 src/libs/orcaice/test/connecttest.cpp
  50. +12 −8 src/libs/orcaice/test/icetest.cpp
  51. +38 −47 src/libs/orcaicegrid/icegridsession.cpp
  52. +13 −16 src/libs/orcaicegrid/icegridsession.h
  53. +10 −0 src/libs/orcaqgui2dfactory/pathfollowerinput.cpp
  54. +2 −0 src/libs/orcaqgui2dfactory/pathfollowerinput.h
  55. +22 −0 src/libs/orcaqgui2dfactory/pathfolloweruserinteraction.cpp
  56. +9 −1 src/libs/orcaqgui2dfactory/pathfolloweruserinteraction.h
  57. +1 −0 src/libs/orcaqgui2dfactory/pathplannerinput.h
  58. +14 −21 src/libs/orcateleop/networkthread.cpp
  59. +17 −22 src/utils/probe/component.cpp
  60. +69 −49 src/utils/slice2orca/gen.cpp
  61. +6 −2 src/utils/slice2orca/gen.h
  62. +34 −7 src/utils/slice2orca/test/stringtest.cpp
View
@@ -104,6 +104,18 @@ Developers: as you make substantial changes in the code (add features, fix bugs,
- feature: add a mechanism to ping admin interfaces (alexm)
- do general cleanup
+@section orca_doc_history_new Post 9.11 changes, to be merged in after sync.
+
+- libHydroColourText
+ - added options to colourtest to render a subset of all color combinations.
+
+- slice2orca
+ - fixed bug related to nested namespace definitions
+ - exceptions are no longer thrown when a null pointer to a class object are encountered in the following cases:
+ - toString(): "null pointer" is returned.
+ - zeroAndClear(): a null pointer is ignored.
+ - toLogStream(): still throws.
+
@section orca_doc_history_head Changes in SVN since Last Release
@par Project wide
@@ -390,6 +402,10 @@ ORCA_WRAP_COMPONENT_INTO_SERVICE( ${srcs} )
- libOrcaCompModel
-Registry information is now sorted alphabetically.
+@par Removed
+
+- SystemTracerMon
+
@section orca_doc_history_2130 Changes in Release 2.13.0
@par Project wide
@@ -33,6 +33,7 @@
% sloccount cpp/include/ cpp/src/
Sice330 = 159523;
Sice331 = 162357;
+Sice340 = 175887;
% indeces
iyy=1;
@@ -1,5 +1,5 @@
/*
- * Orca-Robotics Project: Components for robotics
+ * Orca-Robotics Project: Components for robotics
* http://orca-robotics.sf.net/
* Copyright (c) 2004-2009 Alex Brooks, Alexei Makarenko, Tobias Kaupp
*
@@ -22,7 +22,7 @@ namespace bicycle {
namespace {
-void
+void
convert( const hydrointerfaces::Bicycle::Data& internal,
double wheelbase,
double referenceSpeed,
@@ -36,16 +36,16 @@ convert( const hydrointerfaces::Bicycle::Data& internal,
odometry2dData.pose.p.x = internal.x;
odometry2dData.pose.p.y = internal.y;
odometry2dData.pose.o = internal.yaw;
-
+
odometry2dData.motion.v.x = internal.vlong * cos( internal.steerAngle );
odometry2dData.motion.v.y = 0;
-
+
odometry2dData.motion.w =
internal.vlong * sin( internal.steerAngle ) /
(2.0 * M_PI * wheelbase );
odometry2dData.odometryWasReset = false;
-
+
driveBicycleData.timeStamp.seconds = internal.seconds;
driveBicycleData.timeStamp.useconds = internal.useconds;
@@ -55,7 +55,7 @@ convert( const hydrointerfaces::Bicycle::Data& internal,
driveBicycleData.currentSpeed = internal.vlong;
}
-void
+void
convert( const orca::DriveBicycleCommand& network, hydrointerfaces::Bicycle::Command& internal )
{
internal.vlong = network.speed;
@@ -88,16 +88,9 @@ NetThread::NetThread( HwThread &HwThread,
new orca::VehicleControlVelocityBicycleDescription(*controlDescr);
}
-void
+void
NetThread::initialise()
{
- // multi-try function
- context_.tracer().debug( "NetThread: activating..." );
- orcaice::activate( context_, this );
- // check for stop signal after retuning from multi-try
- if ( isStopping() )
- return;
-
// Initialise external interfaces, multi-try init functions
odometry2dI_ = new orcaifaceimpl::Odometry2dImpl( descr_, "Odometry2d", context_ );
odometry2dI_->initInterface( this );
@@ -120,7 +113,7 @@ NetThread::work()
std::string prefix = context_.tag() + ".Config.";
gbxiceutilacfr::Timer publishTimer;
- double publishInterval = orcaice::getPropertyAsDoubleWithDefault(
+ double publishInterval = orcaice::getPropertyAsDoubleWithDefault(
context_.properties(), prefix+"Odometry2dPublishInterval", 0 );
const int odometryReadTimeout = 500; // [ms]
@@ -162,7 +155,7 @@ NetThread::work()
odometry2dI_->localSetAndSend( odometry2dData );
driveBicycleI_->localSetAndSend( driveBicycleData );
publishTimer.restart();
- }
+ }
else {
odometry2dI_->localSet( odometry2dData );
}
@@ -202,7 +195,7 @@ NetThread::limit( hydrointerfaces::Bicycle::Command &cmd )
// This is a direct callback from the DriveBicycleImpl object.
// It's executed in Ice thread.
// Here we convert to our internal format pass it to HwThread
-void
+void
NetThread::handleData(const orca::DriveBicycleCommand& command)
{
stringstream ss;
@@ -1,5 +1,5 @@
/*
- * Orca-Robotics Project: Components for robotics
+ * Orca-Robotics Project: Components for robotics
* http://orca-robotics.sf.net/
* Copyright (c) 2004-2009 Alex Brooks, Alexei Makarenko, Tobias Kaupp
*
@@ -55,35 +55,30 @@ namespace {
}
}
-MainThread::MainThread( const orcaice::Context &context ) :
+MainThread::MainThread( const orcaice::Context &context ) :
orcaice::SubsystemThread( context.tracer(), context.status(), "MainThread" ),
context_(context)
{
}
-void
+void
MainThread::initialise()
{
setMaxHeartbeatInterval( 10.0 );
- orcaice::activate( context_, this, subsysName() );
- // check for stop signal after retuning from multi-try
- if ( isStopping() )
- return;
-
Ice::PropertiesPtr prop = context_.properties();
std::string prefix = context_.tag()+".Config.";
stdDevPosition_ = orcaice::getPropertyAsDoubleWithDefault( prop, prefix+"StdDevPosition", 0.05 );
stdDevOrientation_ = orcaice::getPropertyAsDoubleWithDefault( prop, prefix+"StdDevOrientation", 1.0 );
- minInterPublishPeriodSec_ = orcaice::getPropertyAsDoubleWithDefault( prop, prefix+"MinInterPublishPeriodSec", 1.0 );
-
+ minInterPublishPeriodSec_ = orcaice::getPropertyAsDoubleWithDefault( prop, prefix+"MinInterPublishPeriodSec", 1.0 );
+
initNetworkInterface();
}
void
MainThread::work()
{
-
+
// temp variables
orca::Localise3dData localiseData;
orca::Odometry3dData odomData;
@@ -92,7 +87,7 @@ MainThread::work()
const int timeoutMs = 1000;
setMaxHeartbeatInterval( timeoutMs/1e3 );
-
+
//
// MAIN LOOP
//
@@ -106,22 +101,22 @@ MainThread::work()
try
{
health().heartbeat();
- if ( odometry3dConsumer_->store().getNext( odomData, timeoutMs ) != 0 )
+ if ( odometry3dConsumer_->store().getNext( odomData, timeoutMs ) != 0 )
{
context_.tracer().debug( "Timeout waiting for data" );
continue;
}
-
+
double timeSincePublish = orcaice::timeDiffAsDouble( orcaice::getNow(), tLastPublish );
if ( timeSincePublish < minInterPublishPeriodSec_ )
continue;
-
+
odometryToLocalise( odomData, localiseData, varPosition, varOrientation );
- context_.tracer().debug( orcaobj::toString(localiseData), 5 );
+ context_.tracer().debug( orcaobj::toString(localiseData), 5 );
localiseInterface_->localSetAndSend( localiseData );
tLastPublish = orcaice::getNow();
}
- catch ( ... )
+ catch ( ... )
{
orcaice::catchMainLoopExceptions( health() );
}
@@ -135,7 +130,7 @@ MainThread::initNetworkInterface()
{
//
// EXTERNAL REQUIRED INTERFACES
- //
+ //
odometry3dConsumer_ = new orcaifaceimpl::StoringOdometry3dConsumerImpl(context_);
// multi-try function
odometry3dConsumer_->subscribeWithTag( "Odometry3d", this, subsysName() );
@@ -146,8 +141,8 @@ MainThread::initNetworkInterface()
orca::VehicleDescription vehicleDescription;
orcaice::getDescriptionWithTag<orca::Odometry3dPrx,orca::VehicleDescription>
( context_, "Odometry3d", vehicleDescription, this, subsysName() );
-
- //
+
+ //
// EXTERNAL PROVIDED INTERFACE
//
localiseInterface_ = new orcaifaceimpl::Localise3dImpl( vehicleDescription.geometry, "Localise3d", context_);
@@ -4,7 +4,7 @@ set( COMP_NAMESPACE propserver )
set( build TRUE )
GBX_REQUIRE_OPTION( build EXE ${APP_NAME} ON )
-set( dep_libs OrcaIfaceImpl OrcaIfaceUtil )
+set( dep_libs OrcaIfaceImpl OrcaIfaceUtil HydroPropertyDb )
GBX_REQUIRE_LIBS( build EXE ${APP_NAME} ${dep_libs} )
if( build)
@@ -1,5 +1,5 @@
/*
- * Orca-Robotics Project: Components for robotics
+ * Orca-Robotics Project: Components for robotics
* http://orca-robotics.sf.net/
* Copyright (c) 2004-2009 Alex Brooks, Alexei Makarenko, Tobias Kaupp
*
@@ -24,7 +24,7 @@ MainThread::MainThread( const orcaice::Context &context ) :
{
}
-void
+void
MainThread::initialise()
{
setMaxHeartbeatInterval( 20.0 );
@@ -43,7 +43,7 @@ MainThread::work()
while ( !isStopping() )
{
- try
+ try
{
// this blocks until new data arrives
const int TIMEOUT_MS = 1000;
@@ -55,20 +55,20 @@ MainThread::work()
ss << "Received new properties: " << ifaceutil::toString( incomingProperties );
context_.tracer().info( ss.str() );
- // Set our local database.
+ // Merge incoming properties with the local database.
propertyDb_.addProperties( incomingProperties.properties );
// Then inform the world
- orca::PropertiesData propData;
- propData.properties = propertyDb_.properties();
- propertiesInterface_->localSetAndSend( propData );
+ orca::PropertiesData resultantProperties;
+ resultantProperties.properties = propertyDb_.properties();
+ propertiesInterface_->localSetAndSend( resultantProperties );
}
health().ok();
continue;
} // end of try
- catch ( ... )
+ catch ( ... )
{
orcaice::catchMainLoopExceptions( health() );
}
@@ -95,8 +95,8 @@ MainThread::initPropertiesDb()
if ( !persistanceFile_.empty() )
{
try {
- std::map<std::string,std::string> propsFromFile = readFromFile( persistanceFile_ );
- cout<<"Properties loaded from persistance file: " << toString(propsFromFile) << endl;
+ std::map<std::string,std::string> propsFromFile = hydropropertydb::readFromFile( persistanceFile_ );
+ cout<<"Properties loaded from persistance file: " << hydropropertydb::toString(propsFromFile) << endl;
propertyDb_.addProperties( propsFromFile );
}
catch ( std::exception &e )
@@ -114,11 +114,11 @@ MainThread::initPropertiesDb()
map<string,string> props = context_.properties()->getPropertiesForPrefix(prefix);
map<string,string> strippedProps;
- for ( map<string,string>::const_iterator it=props.begin(); it!=props.end(); ++it )
+ for ( map<string,string>::const_iterator it=props.begin(); it!=props.end(); ++it )
{
strippedProps.insert( make_pair(it->first.substr(prefix.size()),it->second) );
}
- cout << "Properties loaded from config file: " << toString(strippedProps) << endl;
+ cout << "Properties loaded from config file: " << hydropropertydb::toString(strippedProps) << endl;
propertyDb_.addProperties( strippedProps );
}
@@ -14,7 +14,7 @@
#include <orcaice/subsystemthread.h>
#include <orcaice/context.h>
#include <orcaifaceimpl/properties.h>
-#include "propertydb.h"
+#include <hydropropertydb/propertydb.h>
namespace propserver {
@@ -41,7 +41,7 @@ class MainThread : public orcaice::SubsystemThread
orcaifaceimpl::PropertiesImplPtr propertiesInterface_;
// The database of properties
- PropertyDb propertyDb_;
+ hydropropertydb::PropertyDb propertyDb_;
// Where we load/save our properties
std::string persistanceFile_;
@@ -97,10 +97,10 @@ MainThread::initialise()
for ( size_t i=0; i < powerbaseNames.size(); i++ )
{
- std::string stripPrefix = "";
+ std::string stripPrefix = prefix;
if ( powerbaseNames.size() > 1 )
{
- stripPrefix = powerbaseNames[i]+".";
+ stripPrefix += powerbaseNames[i]+".";
}
std::auto_ptr<hydrointerfaces::SegwayRmp> hydroDriver(
driverFactory->createDriver( powerbaseNames[i], context_.toHydroContext(stripPrefix) ) );
@@ -10,7 +10,7 @@
#include <orcaice/orcaice.h>
-#include <orcaobj/wifi.h>
+#include <orcaifaceutil/wifi.h>
#include "fakedriver.h"
@@ -22,13 +22,10 @@ void FakeDriver::read( orca::WifiData &data )
data.timeStamp = orcaice::getNow();
orca::WifiInterface w;
- orcaobj::setInit(w);
+ ifaceutil::zeroAndClear(w);
// Set some sane values
w.interfaceName = "fake";
- w.linkQuality = 60;
- w.signalLevel = -75;
- w.noiseLevel = -125;
data.interfaces.push_back( w );
}
@@ -12,7 +12,7 @@
#include <vector>
#include <hydrowifi/wifiutil.h>
#include <orcaice/orcaice.h>
-#include <orcaobj/wifi.h>
+#include <orcaifaceutil/wifi.h>
#include "mainthread.h"
#include "hardwaredriver.h"
#include "fakedriver.h"
@@ -69,10 +69,11 @@ MainThread::work()
try
{
orca::WifiData data;
+ ifaceutil::zeroAndClear(data);
driver_->read( data );
context_.tracer().debug("Got new wifi data from driver. Sending it out now.", 3);
- context_.tracer().debug(orcaobj::toString( data ), 5);
+ context_.tracer().debug(ifaceutil::toString( data ), 5);
wifiInterface_->localSetAndSend( data );
Oops, something went wrong.

0 comments on commit 984bc13

Please sign in to comment.